TinySpline
NURBS Library for a Multitude of Programming Languages
v0.3.0

#include <tinyspline.h>
Public Attributes  
struct tsBSplineImpl *  pImpl 
Represents a BSpline which may also be used for NURBS, Bezier curves, lines, and points. NURBS are represented by homogeneous coordinates where the last component of a control point stores the weight of this control point. Bezier curves are BSplines with 'num_control_points == order' and a clamped knot vector, therefore passing through their first and last control point (a property which does not necessarily apply to BSplines and NURBS). If a Bezier curve consists of two control points only, we call it a line. Points, ultimately, are just very short lines consisting of a single control point.
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. NURBS are represented by homogeneous coordinates. For example, let's say we have a NURBS in 2D consisting of 11 control points where 'w_i' is the weight of the i'th control point. Then, the corresponding control points are stored as follows:
[x_0*w_0, y_0*w_0, w_0, x_1*w_1, y_1*w_1, w_1, ..., x_10*w_10, y_10*w_10, w_10]
struct tsBSplineImpl* tsBSpline::pImpl 
The actual implementation.