NURBS Toolbox
 
Click here to produce a printer friendly page
Printer Friendly Page


Home

Short Articles
 WYLUG
 Tele 2
 MySQL, Kylix and Delphi Too.

Software
 NURBS Toolbox

Articles
 Printer Friendly Pages

Misc
 Chantico
 
NURBS - Non Uniform Rational B-Splines.


NURBS Surface NURBS Surface

Toolbox

The NURBS toolbox is collection of routines for the creation, and manipulation of Non-Uniform Rational B-Splines (NURBS). NURBS have to some extent become the de facto industry standard for representing complex geometric information in CAD, CAE and CAM, and are an integral part of many standard data exchange formats such as IGES, STEP and PHIGS.

The toolbox is available for either Matlab or Scilab, and contains both script files and c routines to increase the performance. The intention of these toolboxes is not to provide the worlds fastest NURBS manipulation packages, but that coupled with the matlab/scilab environments they provide a friendly means for interactive research and algorithm prototyping.

All the nurbs routines are prefix with 'nrb' to differentiate them from any other similar sounding matlab script files by other authors. The data structure used to represent the NURBS in Matlab is compatible with that used in the Spline Toolbox by C. de Boor and The MathWorks, Inc and can be manipulated as four dimensional univariate or multivariate B-Splines. Both packages also include demonstration scripts that show examples on how to use the toolbox, and also online help is available.

For a detailed explanation of NURBS and how to manipulate them, I can strongly recommend the book by Les Piegl and Wayne Tiller called 'The NURBS Book' ISBN 3-540-61545-8. Please note that the 'C' code algorithms is this library are modified versions of the pseudo-code within the book.

Functions

The functions currently available in the toolbox are:

Main functions

  • nrbmak - Construct a NURBS from control points and knots.
  • nrbtform - Applying scaling, translation or rotation operators.
  • nrbkntins - Knot insertion/refinement.
  • nrbdegelev - Degree elevation.
  • nrbderiv - NURBS representation of the derivative.
  • nrbdeval - Evaluation of the NURBS derivative.
  • nrbkntmult - Find the multiplicity of a knot vector.
  • nrbreverse - Reverse evaluation direction of the NURBS.
  • nrbtransp - Swap U and V for NURBS surface.
  • nrbline - Construct a straight line.
  • nrbcirc - Construct a circular arc.
  • nrbrect - Construct a rectangle.
  • nrb4surf - Surface defined by 4 corner points.
  • nrbeval - Evaluation of NURBS curve or surface.
  • nrbextrude - Extrude a NURBS curve along a vector.
  • nrbrevolve - Construct surface by revolving a profile.
  • nrbruled - Ruled surface between two NURBS curves.
  • nrbcoons - Construct Coons bilinearly blended surface patch.
  • nrbplot - Plot NURBS curve or surface.

Low level functions - c routines

  • bspeval - Evaluate a univariate B-Spline.
  • bspderiv - B-Spline representation of the derivative
  • bspkntins - Insert a knot or knots into a univariate B-Spline.
  • bspdegelev - Degree elevation of a univariate B-Spline.

Vector and Transformation Utilities

  • vecnorm - Normalisation of Vectors.
  • vecmag - Magnitude of Vectors.
  • vecmag2 - Squared Magnitude of the vectors.
  • vecangle - Alternative to atan2 (0 <= angle <= 2*pi).
  • vecdot - Dot product of two vectors.
  • veccross - Cross product of two vectors.
  • vecrotx - Rotation matrix around the x-axis.
  • vecroty - Rotation matrix around the y-axis.
  • vecrotz - Rotation matrix around the z-axis.
  • vecscale - Scaling matrix.
  • vectrans - Translation matrix.

Misc Utilities

  • deg2rad - Convert degrees to radians.
  • rad2deg - Convert radians to degrees.

Availability

The NURBS toolbox is provide free of any charges and has a GPL license. The source code is available for the Linux, Solaris and Windows, however should compile easily on other platforms. Runar Tenfjord has ported the NURBS toolbox to Python. The module and further details can be found at http://runten.tripod.com/.

Other NURBS software and tutorial material is available:

  • Bastiaan's Matlab NURBS Surface Toolbox for the calculation and plotting of all kinds of non-uniform rational B-spline basis (or blending) functions, curves and surfaces, including special cases such as Bezier and periodic curves / surfaces.
  • The Manchester NURBS library, a library of c routines.
  • NURBS++ a C++ library, with some routines based on the the pseudo-code within 'The NURBS book'.
  • Nurbana - Free 3D NURBS Modeling suite
  • OpenGL - High Performance 2D/3D Graphics that contains routine for the display of NURBS curves and surfaces. Mesa is a free OpenGL clone library with source code available.
  • A short introduction to splines and NURBS.
  • Another short introduction to splines and NURBS
  • FITPACK - a collection of fortran programs for curve and surface fitting with splines and tensor product splines.
  • Snurbs - a Simple Nurbs Library for the need to interpolate and approximate scattered and regularly distributed data points with NURBS surfaces (link broken at present).
  • Introduction to NURBS Curves: A Guide for the Uninitiate.
 
    ARIA - is a Mark Spink Production Copyright © 2000
All Rights Reserved.
Email: dmspink@aria.uklinux.net