Class CubicBSpline
- java.lang.Object
-
- com.macrofocus.high_d.parallelcoordinates.geometry.curve.Curve
-
- com.macrofocus.high_d.parallelcoordinates.geometry.curve.CubicBSpline
-
public class CubicBSpline extends Curve
The cubic B-spline is defined by third order polynomial basis functions. Each point on the curve is locally controlled by 4 control-points. In general, the curve does not pass through the control points, only near. The exceptions to this are the first and last control-points and if there are duplicate sequential control-points.
Relative to other curves, the cubic B-spline is computationally inexpensive, and easy to work with. To create a closed cubic B-spline, use "0:n-1,0:2" as the control-string and set interpolateEndpoints to false. Figures 1, 2 & 3 show some examples of cubic B-splines. See the appendTo method for more information.
-
-
Constructor Summary
Constructors Constructor Description CubicBSpline(ControlPath cp, GroupIterator gi)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendTo(com.macrofocus.high_d.parallelcoordinates.geometry.curve.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".boolean
getInterpolateEndpoints()
Returns the interpolateEndpoints value.int
getSampleLimit()
Returns a value of 1.void
setInterpolateEndpoints(boolean b)
Sets the curve to start at the first control-point and end at the last control-point specified by the group-iterator.-
Methods inherited from class com.macrofocus.high_d.parallelcoordinates.geometry.curve.Curve
getConnect, getControlPath, getGroupIterator, resetMemory, setConnect
-
-
-
-
Constructor Detail
-
CubicBSpline
public CubicBSpline(ControlPath cp, GroupIterator gi)
-
-
Method Detail
-
eval
protected 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 int getSampleLimit()
Returns a value of 1.
-
setInterpolateEndpoints
public void setInterpolateEndpoints(boolean b)
Sets the curve to start at the first control-point and end at the last control-point specified by the group-iterator.- See Also:
getInterpolateEndpoints()
-
getInterpolateEndpoints
public boolean getInterpolateEndpoints()
Returns the interpolateEndpoints value. The default value is false.- See Also:
setInterpolateEndpoints(boolean)
-
appendTo
public void appendTo(com.macrofocus.high_d.parallelcoordinates.geometry.curve.MultiPath mp)
The requirements for this curve are the group-iterator must be in-range and have a group size of at least 4. If interpolateEndpoints is true, then the group size must be at least 7. If these requirements are not met then this method returns quietly.
-
-