public class NaturalCubicSpline extends ParametricCurve
The natural-cubic-spline is constructed using piecewise third order polynomials which pass through all the control-points specified by the group-iterator. The curve can be open or closed. Figure 1 shows an open curve and figure 2 shows a closed curve.
Constructor and Description |
---|
NaturalCubicSpline(ControlPath cp,
GroupIterator gi) |
Modifier and Type | Method and Description |
---|---|
void |
appendTo(MultiPath mp)
The requirements for this curve are the group-iterator must be in-range and have a group size of at least 2.
|
protected void |
eval(double[] p)
The eval method evaluates a point on a curve given a parametric value "t".
|
boolean |
getClosed()
Returns the value of closed.
|
int |
getSampleLimit()
Returns a value of 1.
|
void |
resetMemory()
Resets the shared memory to the initial state.
|
void |
setClosed(boolean b)
The closed attribute determines which tri-diagonal matrix to solve.
|
getConnect, getControlPath, getGroupIterator, setConnect, setControlPath, setGroupIterator
public NaturalCubicSpline(ControlPath cp, GroupIterator gi)
protected void eval(double[] p)
ParametricCurve
eval
in class ParametricCurve
public void setClosed(boolean b)
getClosed()
public boolean getClosed()
setClosed(boolean)
public int getSampleLimit()
getSampleLimit
in class ParametricCurve
public void appendTo(MultiPath mp)
appendTo
in class Curve
MultiPath
,
BinaryCurveApproximationAlgorithm
public void resetMemory()
Curve
resetMemory
in class Curve
Copyright © 2024. All rights reserved.