|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.yobotics.simulationconstructionset.util.splines.QuinticSplineInterpolator
public class QuinticSplineInterpolator
Constructor Summary | |
---|---|
QuinticSplineInterpolator(java.lang.String name,
int pointsToInterpolate,
int numberOfSplines,
YoVariableRegistry parentRegistry)
Create a new QuinticSplineInterpolator |
Method Summary | |
---|---|
void |
compute(double xx,
int numberOfDerivatives,
double[][] resultToPack)
Calculates the y coordinate of the spline corresponding to the x coordinate resultToPack is a 2-dimensional array with resultToPack[spline][derivative], where the 0th derivative is the position, 1st velocity etc... |
void |
determineCoefficients(int splineIndex,
double[] yIn,
double v0,
double vf,
double a0,
double af)
Determines the coefficients for one spline |
void |
initialize(double[] xIn)
Initializes the spline |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QuinticSplineInterpolator(java.lang.String name, int pointsToInterpolate, int numberOfSplines, YoVariableRegistry parentRegistry)
name
- Name of the YoVariableRegistrypointsToInterpolate
- Number of points the spline has to pass (>= 2)numberOfSplines
- Number of splines it creates that have the same x coordinates for the points to interpolateMethod Detail |
---|
public void initialize(double[] xIn)
xIn
- Array (length = pointsToInterpolate) with the x coordinates of the points to interpolatepublic void determineCoefficients(int splineIndex, double[] yIn, double v0, double vf, double a0, double af)
splineIndex
- Index for the spline ( 0 <= splineIndex < pointsToInterpolate)yIn
- Array (length = pointsToInterpolate) with the y coordinates of the points to interpolatev0
- Initial velocityvf
- Final velocitya0
- Initial accelerationaf
- Final accelerationpublic void compute(double xx, int numberOfDerivatives, double[][] resultToPack)
xx
- x coordinate to calculatenumberOfDerivatives
- Number of derivatives to calculate ( <= 5 )resultToPack
- array[numberOfSplines][numberOfDerivatives+1]
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |