Class Bezier3
java.lang.Object
com.marginallyclever.convenience.bezier3.Bezier3
3D Bezier curve implementation. All points are in the same space - p1 and p2 are not relative to p0 and p3, respectively.
See Wikipedia
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjavax.vecmath.Vector3d
interpolate
(double i) interpolate along the path.
-
Field Details
-
p0
public javax.vecmath.Vector3d p0 -
p1
public javax.vecmath.Vector3d p1 -
p2
public javax.vecmath.Vector3d p2 -
p3
public javax.vecmath.Vector3d p3
-
-
Constructor Details
-
Bezier3
public Bezier3()
-
-
Method Details
-
interpolate
public javax.vecmath.Vector3d interpolate(double i) interpolate along the path. This code is slow, intuitive, and it works.- Parameters:
i
- 0...1 inclusive- Returns:
- the interpolated
Vector3d
along the path.
-