Calculates coordinates along a spline curve using interpolation.
splinePoint()
calculates coordinates along a spline curve using four points p0, p1, p2, p3. It expects points in the same order as the spline() function. splinePoint()
works one axis at a time. Passing the points' x-coordinates will calculate the x-coordinate of a point on the curve. Passing the points' y-coordinates will calculate the y-coordinate of a point on the curve.
The first parameter, a
, is the coordinate of point p0.
The second and third parameters, b
and c
, are the coordinates of points p1 and p2.
The fourth parameter, d
, is the coordinate of point p3.
The fifth parameter, t
, is the amount to interpolate along the span from p1 to p2. t = 0
is p1, t = 1
is p2, and t = 0.5
is halfway between them.
Examples
Syntax
splinePoint(a, b, c, d, t)