CatmullRomChain1

class CatmullRomChain1(points: List<Double>, alpha: Double, loop: Boolean)

Calculates the 1D Catmull–Rom spline for a chain of points and returns the combined curve.

For more details, see CatmullRom1.

Parameters

points

The List of 1D points where CatmullRom1 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 or not to connect the first and last point so it forms a closed shape.

Constructors

CatmullRomChain1
Link copied to clipboard
fun CatmullRomChain1(points: List<Double>, alpha: Double = 0.5, loop: Boolean = false)

Functions

position
Link copied to clipboard
fun position(rt: Double): Double

Properties

loop
Link copied to clipboard
val loop: Boolean = false
segments
Link copied to clipboard
val segments: List<CatmullRom1>