Package com.graphbuilder.curve
Class ParametricCurve
java.lang.Object
com.graphbuilder.curve.Curve
com.graphbuilder.curve.ParametricCurve
- Direct Known Subclasses:
BezierCurve,BSpline,CardinalSpline,CatmullRomSpline,CubicBSpline,LagrangeCurve,NaturalCubicSpline
Curves that extend the ParametricCurve class are continuous and can use the
BinaryCurveApproximationAlgorithm class to generate a sequence of points that
approximate the curve. Note: Approximate means a finite set of points that
are on the curve, not close to the curve.
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voideval(double[] p) The eval method evaluates a point on a curve given a parametric value "t".abstract intThe sample limit specifies how many additional subdivisions are done to ensure that there are no missed pieces of the curve.Methods inherited from class com.graphbuilder.curve.Curve
appendTo, getConnect, getControlPath, getGroupIterator, resetMemory, setConnect, setControlPath, setGroupIterator
-
Constructor Details
-
ParametricCurve
-
-
Method Details
-
eval
protected abstract void eval(double[] p) The eval method evaluates a point on a curve given a parametric value "t". The parametric value "t" is stored in the last index location of the specified double array. This value should not be changed. The dimension of the point to evaluate is p.length - 1. The result of the evaluation is placed in index locations 0 .. p.length - 2 (inclusive). The eval method should remain protected except for those curves that do no need any preparation to be done in the appendTo method. -
getSampleLimit
public abstract int getSampleLimit()The sample limit specifies how many additional subdivisions are done to ensure that there are no missed pieces of the curve. The sample limit must be >= 0.
-