CatmullRom1

class CatmullRom1(p0: Double, p1: Double, p2: Double, p3: Double, alpha: Double)

Creates a 1D Catmull-Rom spline curve.

Parameters

p0

The first control point.

p1

The starting anchor point.

p2

The ending anchor point.

p3

The second control point.

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.

Constructors

CatmullRom1
Link copied to clipboard
fun CatmullRom1(p0: Double, p1: Double, p2: Double, p3: Double, alpha: Double = 0.5)

Functions

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

Properties

alpha
Link copied to clipboard
val alpha: Double = 0.5
p0
Link copied to clipboard
val p0: Double
p1
Link copied to clipboard
val p1: Double
p2
Link copied to clipboard
val p2: Double
p3
Link copied to clipboard
val p3: Double
t0
Link copied to clipboard
val t0: Double = 0.0

Value of t for p0.

t1
Link copied to clipboard
val t1: Double

Value of t for p1.

t2
Link copied to clipboard
val t2: Double

Value of t for p2.

t3
Link copied to clipboard
val t3: Double

Value of t for p3.