All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class berkeley.cs.dmc.bspline.BSpline

java.lang.Object
   |
   +----berkeley.cs.dmc.bspline.BSpline

public class BSpline
extends Object
This class provides functions for uniform cubic b-splines.


Constructor Index

 o BSpline()
The no argument constructor generates a b-spline with no control points.
 o BSpline(int, int, float[][])
This constructor takes the dimensionof the output vector, the number of control points and the control points themselves.

Method Index

 o evaluate(float, float[])
Evaluate the spline at value u.
 o evaluateDpdotDu(float, float, float[])
Evaluate the derivative of Dpdot with respect to the parameter.
 o evaluateDpDu(float, float[])
Evaluate the derivative of the output vector with respect to the parameter at the parameter value u.
 o evaluateOne(int, float)
Evaluate a single output field of the spline at value u.
 o evaluateSpeed(float, float)
Evaluate the magnitude of the derivative of the output vector with respect to some variable, t, given the parameter and derivative of the parameter with respect to t.
 o newControls(int, float[][])
Change the control points.

Constructors

 o BSpline
 public BSpline()
The no argument constructor generates a b-spline with no control points.

 o BSpline
 public BSpline(int dim,
                int num,
                float cont[][])
This constructor takes the dimensionof the output vector, the number of control points and the control points themselves.

Parameters:
dim - The dimension of the output vector.
num - The number of control points.
The - control points. A num by dim array.

Methods

 o newControls
 public void newControls(int num,
                         float cont[][])
Change the control points.

Parameters:
num - The new number of controls.
cont - The new control points.
 o evaluate
 public void evaluate(float u,
                      float pt[]) throws ArithmeticException
Evaluate the spline at value u. u must be greater than or equal to 0 and less than the nummber of controls - 3.

Parameters:
u - The parameter value to evaluate at.
pt - Return space for the output vector.
Throws: ArithmeticException
Thrown if the parameter value is out of range.
 o evaluateSpeed
 public float evaluateSpeed(float u,
                            float u_dot) throws ArithmeticException
Evaluate the magnitude of the derivative of the output vector with respect to some variable, t, given the parameter and derivative of the parameter with respect to t. The parameter value must be greater than or equal to 0 and less than the nummber of controls - 3.

Parameters:
u - The parameter value to evaluate at.
u_dot - The derivative of the parameter value wrt t.
Returns:
The magnitude of the derivative of the output vector wrt t.
Throws: ArithmeticException
Thrown if the parameter value is out of range.
 o evaluateDpDu
 public void evaluateDpDu(float u,
                          float pt[]) throws ArithmeticException
Evaluate the derivative of the output vector with respect to the parameter at the parameter value u. u must be greater than or equal to 0 and less than the nummber of controls - 3.

Parameters:
u - The parameter value to evaluate at.
pt - Return space for the derivative vector.
Throws: ArithmeticException
Thrown if the parameter value is out of range.
 o evaluateDpdotDu
 public void evaluateDpdotDu(float u,
                             float u_dot,
                             float pt[]) throws ArithmeticException
Evaluate the derivative of Dpdot with respect to the parameter. Dpdot is the derivative of the output vector with respect to some other variable t. The derivative is evaluated for the parameter value u and parameter derivative u_dot with respect to t.

Parameters:
u - The parameter value to evaluate at.
u_dot - The derivative of the parameter value wrt t.
pt - Return space for the derivative vector.
Throws: ArithmeticException
Thrown if the parameter value is out of range.
 o evaluateOne
 public float evaluateOne(int i,
                          float u)
Evaluate a single output field of the spline at value u. u must be greater than or equal to 0 and less than the nummber of controls - 3.

Parameters:
i - The index of the output value to evaluate.
u - The parameter value to evaluate at.
Returns:
The ith output value for parameter value u.
Throws: ArithmeticException
Thrown if the parameter value is out of range.

All Packages  Class Hierarchy  This Package  Previous  Next  Index