TinySpline
0.7.0
Spline Library for a Multitude of Programming Languages

#include <tinyspline.h>
Public Attributes  
struct tsBSplineImpl *  pImpl 
Represents a BSpline, which may also be used for NURBS, Bezier curves, lines, and points. NURBS use homogeneous coordinates to store their control points (i.e. the last component of a control point stores the weight). Bezier curves are BSplines with 'num_control_points == order' and a clamped knot vector, which lets them pass through their first and last control point (a property which does not necessarily apply to BSplines and NURBS). Lines and points, on that basis, are Bezier curves of degree 1 (lines) and 0 (points).
Two dimensional control points are stored as follows:
[x_0, y_0, x_1, y_1, ..., x_n1, y_n1]
Tree dimensional control points are stored as follows:
[x_0, y_0, z_0, x_1, y_1, z_1, ..., x_n1, y_n1, z_n1]
... and so on. As already mentioned, NURBS use homogeneous coordinates to store their control points. For example, a NURBS in 2D stores its control points as follows:
[x_0*w_0, y_0*w_0, w_0, x_1*w_1, y_1*w_1, w_1, ...]
where 'w_i' is the weight of the i'th control point.
struct tsBSplineImpl* tsBSpline::pImpl 
The actual implementation.