public class CardinalSpline extends ParametricCurve
The Cardinal-spline passes through the points in the control-path specified by the group-iterator. However, the curve does not pass through the first or the last control-point, it begins at the second control-point and ends at the second last control-point.
There is a single parameter, alpha, that gives some control over the shape of the curve. When the value of alpha is 0.5 the curve becomes the CatmullRomSpline. Figure 1 shows an example of a CardinalSpline.
CatmullRomSpline
Constructor and Description |
---|
CardinalSpline(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 4.
|
protected void |
eval(double[] p)
The eval method evaluates a point on a curve given a parametric value "t".
|
double |
getAlpha()
Returns the value of alpha.
|
int |
getSampleLimit()
Returns a value of 1.
|
void |
setAlpha(double a)
Sets the value of alpha.
|
getConnect, getControlPath, getGroupIterator, resetMemory, setConnect, setControlPath, setGroupIterator
public CardinalSpline(ControlPath cp, GroupIterator gi)
protected void eval(double[] p)
ParametricCurve
eval
in class ParametricCurve
public double getAlpha()
setAlpha(double)
public void setAlpha(double a)
getAlpha()
public int getSampleLimit()
getSampleLimit
in class ParametricCurve
public void appendTo(MultiPath mp)
appendTo
in class Curve
MultiPath
,
BinaryCurveApproximationAlgorithm
Copyright © 2016. All rights reserved.