class WiggleInterpolator : HeadingInterpolator
Heading interpolator that wraps another interpolator and adds sinusoidal oscillations ("wiggles") while preserving continuity. More specifically, the wiggle function is composed of a sine wave with a quintic spline on either end.
amplitude
- amplitude of the wiggle oscillations
desiredPeriod
- period fo the wiggle oscillations
baseInterpolator
- base interpolator to add oscillations to (e.g., oscillations relative to the tangent)
WiggleInterpolator(amplitude: Double, desiredPeriod: Double, baseInterpolator: HeadingInterpolator = TangentInterpolator())
Heading interpolator that wraps another interpolator and adds sinusoidal oscillations ("wiggles") while preserving continuity. More specifically, the wiggle function is composed of a sine wave with a quintic spline on either end. |
lateinit var curve: ParametricCurve
Base parametric curve |
fun init(curve: ParametricCurve): Unit
Initialize the interpolator with a curve. |
fun deriv(s: Double, t: Double = curve.reparam(s)): Double
Returns the heading derivative at the specified s. |
|
fun end(): Double
Returns the end heading. |
|
fun endDeriv(): Double
Returns the end heading derivative. |
|
fun endSecondDeriv(): Double
Returns the end heading second derivative. |
|
operator fun get(s: Double, t: Double = curve.reparam(s)): Double
Returns the heading at the specified s. |
|
fun secondDeriv(s: Double, t: Double = curve.reparam(s)): Double
Returns the heading second derivative at the specified s. |
|
fun start(): Double
Returns the start heading. |
|
fun startDeriv(): Double
Returns the start heading derivative. |
|
fun startSecondDeriv(): Double
Returns the start heading second derivative. |