Example: Spline Data Format
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 un-normalized spline parameters at each point.
Data format:
params[]
(dbl)
Array of spline parameters (t) at each point
points[][3]
(dbl)
Array of spline interpolant points
tangents[][3]
(dbl)
Array of tangent vectors at each point
Parameterization:
1. x, y, and z are a series of unique cubic functions, one per segment, fully determined by the start, endpoints, and tangents of each segment.
2. Let p_max be the parameter of the last spline point. Then, t', the un-normalized parameter, is t * p_max.
3. Locate the spline segment such that:
par_arr[i] < t' < par_arr[i+1]
(if t < 0 or t > +1, use the first or last segment).
14.\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])