public class NURBSpline extends BSpline
General implementation of the Non-Uniform Rational B-spline or NURB-Spline. The main advantage of the NURB-Spline over the B-Spline is the ability to represent conic sections. To do this, a curve with degree of 2 is used. Figure 1 contains examples of conic arcs.

NURB-Splines can also be used to generate circles as shown in figure 2.

As seen in the figures, every control-point has an associated weight value. The weight-values control how much relative pull each control-point has on the curve. If the weight-value is 0, then the associated point will have no affect on the curve. If a point has an associated weight of 0, but the curve is expected to pass through that point, then it is likely that the result of evaluation will be the origin. All weights must be >= 0.
NON_UNIFORM, UNIFORM_CLAMPED, UNIFORM_UNCLAMPED| Constructor and Description |
|---|
NURBSpline(ControlPath cp,
GroupIterator gi) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendTo(MultiPath mp)
The requirements of the appendTo method include the requirements of the BSpline appendTo method, plus
a couple more.
|
protected void |
eval(double[] p)
The eval method evaluates a point on a curve given a parametric value "t".
|
boolean |
getUseWeightVector()
Returns the value of the useWeightVector flag.
|
ValueVector |
getWeightVector()
Returns the weight-vector.
|
void |
resetMemory()
Resets the shared memory to the initial state.
|
void |
setUseWeightVector(boolean b)
Sets the value of the useWeightVector flag.
|
void |
setWeightVector(ValueVector v)
Sets the weight-vector.
|
getDegree, getKnotVector, getKnotVectorType, getSampleLimit, getUseDefaultInterval, N, setDegree, setInterval, setKnotVector, setKnotVectorType, setSampleLimit, setUseDefaultInterval, t_max, t_mingetConnect, getControlPath, getGroupIterator, setConnect, setControlPath, setGroupIteratorpublic NURBSpline(ControlPath cp, GroupIterator gi)
protected void eval(double[] p)
ParametricCurvepublic ValueVector getWeightVector()
setWeightVector(ValueVector)public void setWeightVector(ValueVector v)
IllegalArgumentException - If the value-vector is null.getWeightVector()public boolean getUseWeightVector()
setUseWeightVector(boolean)public void setUseWeightVector(boolean b)
getUseWeightVector()public void appendTo(MultiPath mp)
appendTo in class BSplineBSpline.appendTo(MultiPath)public void resetMemory()
CurveresetMemory in class BSplineCopyright © 2022. All rights reserved.