NLib™

The NURBS based Library

NLib™ is a C library filled with an extensive set of robust functions that lies at the core of implementing non-uniform rational B-spline (NURBS) technology. This technology is extensively documented in “The NURBS Book” by Les Piegl and Wayne Tiller, the original authors of NLib™.

Key Features

  • Code Distribution – A platform independent geometry kernel. NLib is a mature C library written and supported by industry experts.
  • NURBS – Contains structures for the representation of NURBS curves and surfaces and supporting objects.
  • Basics – Curve creation, surface creation.
  • Advanced Surface Construction – Coons surfaces, Gordon surfaces, sweeping, skinning, least squares fitting, etc.
  • Additional Functions – Curve and surface extend, reverse, projection, etc.
  • General – math, vector, and geometry tools.
  • Evaluation And Analysis
  • Modification Tools – Transformations, curve bending, surface flattening, and interactive shaping tools.
  • Nurbs Tools – Knot insertion, knot removal, reparametrize, make compatible, splitting, degree elevation and reduction.
  • Basis – B-spline and NURBS basis functions.

Summary of Functions

Curve Creation:
• Lines, line segments, circles, circular arcs, conics, conic arcs, and degenerate point curve.
• Global curve interpolation to points and/or derivatives- cubic spline or arbitrary degree.
• Global least squares curve approximation to point data.
• Global curve approximation / data reduction with error bound specified.
• Global weighted and constrained least squares curve approximation.
• Offset curve approximation.
• Offset of a connected set of NURBS curves with trimming and filleting.
• Approximation of procedurally defined curves to within tolerance.
• Approximation of a NURBS curve with a non-rational curve.
• Mapping of a uv-domain curve onto its surface.
• Local C1-continuous non-rational cubic curve interpolation.
• Local G1- or C1-continuous parabolic curve interpolation.
• Local G1-continuous rational quadratic curve interpolation.
• Local G1-continous bi-arc curve interpolation.
• Local data approximation with G1-continuous quadratic curves.
• Local data approximation with G1-continuous cubic curves.

 Surface Creation:
• Bilinear surfaces, planes, cones, cylinders, spheres, and torus.
• Extruded surfaces, ruled surfaces, and surfaces of revolution.
• Ellipsoids, elliptic paraboloids and hyperboloids of one sheet.
• Global surface interpolation to point data.
• Global least squares surface approximation to point data.
• Global surface approximation / data reduction with error bound specified.
• Local C(1,1)-continuous non-rational, bicubic surface interpolation.
• Surface interpolation and approximation functions that allow specification
of boundary constraints, including tangent/derivative vectors.

Advanced Surface Creation:
• Bilinear and Bicubic Coons surface.
• Gordon surface through a compatible curve network.
• Swept surface, arbitrary trajectory curve, interpolative or approximative to within specified error bound.
• Translational swept surface.
• Swung surfaces.
• Interpolative skinning, with or without a spine curve.
• Interpolative and approximate skinning with rail curves and cross-boundary continuity constraints.
• Approximate skinning with error bound specified.

Additional NURBS curve and surface functions:
• Extend curve and surface boundary with continuity control.
• Project a point to a curve or surface to determine the corresponding parameter space point.
• Given a tangent direction on a surface, determine the corresponding direction in parameter space.
• Reverse parameter direction of a curve or surface.
• Unclamp a clamped curve or surface.
• Scale/translate the parameter domain(s) of a curve or surface.
• Various conic utilities; e.g. determine type of conic, implicit equation of conic,
and geometric characteristics of a conic (vertex, radii, axes, etc).
• Make a set of curves or surfaces compatible (same degrees and knots).
• Curve and surface cleaning, with reparameterization for enhanced cleaning of piecewise Bezier curves and surfaces.
• Approximately equally spaced points on a curve.
• Approximately uniformly spaced grid of points on a surface.

General Math and Geometric Functions:
• An extensive set of functions to perform basic geometric operations on vectors,
lines, polygons, and planes; this includes distances, projections, intersections,
bounding boxes, transformations, closure, and containment tests.
• An extensive set of functions to perform basic mathematical and numerical
operations such as matrix algebra, solution to linear systems of equations,
Horner evaluation of polynomials, polynomial root finding, and computation of the binomialcoefficients.
• An extensive set of functions to check (validate) object data and set error flags;
e.g. validate the data defining a curve or surface object, and check if a parameter is within valid bounds.

Evaluation of NURBS curves and surfaces:
• Compute point and derivatives of arbitrary order on a NURBS curve.
• Compute the Frenet frame on a curve at a given point.
• Compute point and partial derivatives of arbitrary order on a NURBS surface.
• Compute the surface normal vector at a given point.
• Compute curvature on curves and surfaces.
• Compute minmax box of curves and surfaces.
• Arc length of a curve.
• Analyze curves for cusps, straight line segments, and degeneracy.

Transformations, projections and interactive shaping tools:
• Translation, rotation and scaling of curves and surfaces.
• Project a point to a curve or surface to determine the corresponding parameter space point.
• Parallel and perspective projection of curves and surfaces onto a plane.
• Reposition curve/surface control points to obtain desired translational changes.
• Modify curve/surface weights to obtain desired perspective changes.
• Curve, polyline, and surface region warping.
• Curve and surface flattening.
• Curve bending.
• Surface axial and central bending.
• Curve and surface axial deformations: pinch, taper, twist and shear.
• Constraint-based modification via control point repositioning.

NURBS curve and surface geometric tools:
• Knot insertion and knot refinement.
• Inverse knot insertion.
• Decomposition into piecewise Bezier form.
• Knot removal, including “cleaning” routines (data reduction) with specification of boundary constraints.
• Degree elevation and degree reduction.
• Subcurve and subsurface extraction.
• Curve and surface splitting.
• Extraction of isoparametric curves from surfaces.
• Reparameterize a curve with a linear rational function.
• Reparameterize a curve with a B-spline function.
• Reparameterize a surface with a linear rational function.
• Make curve end weights equal.

B-spline and NURBS basis functions:
• Evaluation of rational and non-rational basis functions.
• Computation of single or all nonzero functions.
• Derivatives of arbitrary order.
• Global maximum and maximum in each span.

Scalar-valued NURBS functions of one or two variables:
• Creation of scalar-valued NURBS.
• Functions of 1 or 2 parameters.
• Evaluation of scalar-valued functions, including derivatives of any order.

Conversions:
• Conversion between NURBS and piecewise Bezier or polynomial spline.
• An extensive set of routines to support the evaluation and processing of Bezier and polynomial curves and surfaces.
• Tessellation of surfaces to triangles.
• Conversion of IGES curves and surfaces to NURBS form.

Symbolic operators:
• Extract derivative curves and surfaces.
• Compute maximum bounds on magnitudes of curve/surface derivatives.
• Form linear combinations of curves/surfaces.
• Extract the surface of normal vectors to a surface.
• Compute various products of curves, surfaces, and functions.