cspline VEX function

Computes a Catmull-Rom (Cardinal) spline between the key points specified.

Contexts: image3d, chop, cop, pop, sop, surface, displace, fog, light, shadow, photon, cvex

  1. float cspline(float t, float val1)

  2. vector cspline(float t, vector val1)

  3. vector4 cspline(float t, vector4 val1)

Computes a Catmull-Rom (Cardinal) spline between the key points specified. The keys are uniformly spaced over the range 0 to 1.

Because of the nature of the Cardinal spline, the value associated with the first and last keys will never be returned. However, these keys are used to determine the shape of the curve on entry and exit.