Spline
The spline curve entity is a nonuniform cubic spline, defined by a series of three-dimensional points, tangent vectors at each point, and an array of unnormalized spline parameters at each point.
Data Format:
par_arr[] Array of spline parameters
(t) at each point.
pnt_arr[][3] Array of spline interpolant points
tan_arr[][3] Array of tangent vectors at
each point
Parameterization:
x, y, and z are a series of unique cubic functions, one per segment, fully determined by the starting and ending points, and tangents of each segment.
Let p_max be the parameter of the last spline point. Then, t, the unnormalized parameter, is t * p_max.
Locate the ith spline segment such that:
par_arr[i] < t' < par_arr[i+1]
(If t < 0 or t > +1, use the first or last segment.)
t0 = (t' - par_arr[i]) / (par_arr[i+1] - par_arr[i])
t1 = (par_arr[i+1] - t') / (par_arr[i+1] - par_arr[i])