|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.math.CubicSpline
public class CubicSpline
A C2 continuous spline that goes through all control points Assumptions: The spline is not closed y''(0)=0 y''(n-1)=0 The point distribution is uniform
| Field Summary | |
|---|---|
private float[] |
a
|
private float[] |
as
|
private float[] |
b
|
private float[] |
bs
|
private float[] |
c
|
private float[] |
cs
|
private float[] |
d
|
private float[] |
D
|
private float[] |
ds
|
private int |
n
|
private float[] |
y
|
| Constructor Summary | |
|---|---|
CubicSpline(float[] points)
Constructor The interpolated 2D point are: (0, points[0]), (1, points[1]), ..., (n-1, points[n-1]) |
|
| Method Summary | |
|---|---|
float |
eval(float time)
Evaluates the spline |
float |
evalDiff(float time)
Evaluates the first derivative of the spline |
float |
evalDiff(float time,
float h)
Evaluates the first derivative of the spline |
float |
evalDiff2(float time)
Evaluates the 2nd derivative of the spline |
float |
evalDiff2(float time,
float h)
Evaluates the 2nd derivative of the spline |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private float[] a
private float[] b
private float[] c
private float[] d
private float[] y
private float[] D
private float[] as
private float[] bs
private float[] cs
private float[] ds
private int n
| Constructor Detail |
|---|
public CubicSpline(float[] points)
points - interpolation points| Method Detail |
|---|
public float eval(float time)
time - time, scaled for length, 0<=time<=1
public float evalDiff(float time)
time - time, scaled for length, 0<=time<=1
public float evalDiff(float time,
float h)
time - time, scaled for length, 0<=time<=1h - timestep between two points in the spline
public float evalDiff2(float time)
time - time, scaled for length, 0<=time<=1
public float evalDiff2(float time,
float h)
time - time, scaled for length, 0<=time<=1
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||