public class WiggleInterpolator
extends 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.
parametricCurve
Constructor and Description |
---|
WiggleInterpolator(double amplitude,
double desiredPeriod,
HeadingInterpolator baseInterpolator)
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.
|
Modifier and Type | Method and Description |
---|---|
double |
deriv(double displacement)
Returns the heading derivative at the specified displacement.
|
double |
get(double displacement)
Returns the heading at the specified displacement.
|
void |
init(ParametricCurve parametricCurve)
Initialize the interpolator with a parametricCurve.
|
boolean |
respectsDerivativeContinuity()
Returns true if the heading interpolator respects derivative continuity at path segment endpoints. That is,
the start and end heading derivatives match those of the
class TangentInterpolator . |
double |
secondDeriv(double displacement)
Returns the heading second derivative at the specified displacement.
|
deriv, end, endDeriv, endSecondDeriv, get, getParametricCurve, init, respectsDerivativeContinuity, secondDeriv, setParametricCurve, start, startDeriv, startSecondDeriv
public WiggleInterpolator(double amplitude, double desiredPeriod, HeadingInterpolator baseInterpolator)
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 oscillationsdesiredPeriod
- period fo the wiggle oscillationsbaseInterpolator
- base interpolator to add oscillations to (e.g., oscillations relative to the tangent)amplitude
- amplitude of the wiggle oscillationsdesiredPeriod
- period fo the wiggle oscillationsbaseInterpolator
- base interpolator to add oscillations to (e.g., oscillations relative to the tangent)public void init(ParametricCurve parametricCurve)
Initialize the interpolator with a parametricCurve.
parametricCurve
- parametric curvepublic boolean respectsDerivativeContinuity()
Returns true if the heading interpolator respects derivative continuity at path segment endpoints. That is,
the start and end heading derivatives match those of the class TangentInterpolator
.
class TangentInterpolator
class TangentInterpolator
public double get(double displacement)
Returns the heading at the specified displacement.
public double deriv(double displacement)
Returns the heading derivative at the specified displacement.
public double secondDeriv(double displacement)
Returns the heading second derivative at the specified displacement.