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.


| Modifier and Type | Field and Description |
|---|---|
private static int |
ci |
private boolean |
closed |
private static double[][] |
data |
private static double[][] |
pt |
| 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.
|
private static void |
precalc(int n,
int dim,
boolean closed) |
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, setGroupIteratorprivate static double[][] pt
private static double[][] data
private static int ci
private boolean closed
public NaturalCubicSpline(ControlPath cp, GroupIterator gi)
protected void eval(double[] p)
ParametricCurveeval in class ParametricCurveprivate static void precalc(int n,
int dim,
boolean closed)
public void setClosed(boolean b)
getClosed()public boolean getClosed()
setClosed(boolean)public int getSampleLimit()
getSampleLimit in class ParametricCurvepublic void appendTo(MultiPath mp)
appendTo in class CurveMultiPath,
BinaryCurveApproximationAlgorithmpublic void resetMemory()
CurveresetMemory in class Curve