CatmullRomChain3
class CatmullRomChain3(points: List<Vector3>, alpha: Double = 0.5, val loop: Boolean = false)(source)
Calculates the 3D Catmull–Rom spline for a chain of points and returns the combined curve.
For more details, see CatmullRom3.
Parameters
points
The List of 3D points where CatmullRom3 is applied in groups of 4.
alpha
The tension of the curve. Use 0.0 for the uniform spline, 0.5 for the centripetal spline, 1.0 for the chordal spline.
loop
Whether to connect the first and last point, such that it forms a closed shape.
The ends of an open chain use phantom points that mirror the first and last edge, so that the curve, like the centripetal and chordal parametrizations themselves, doesn't depend on the scale of the points. Repeated consecutive points are dropped.