Class CatmullRomSpline
java.lang.Object
org.episteme.core.mathematics.geometry.curves.CatmullRomSpline
Catmull-Rom spline curve.
A Catmull-Rom spline is a smooth curve that passes through all control points. It uses cubic interpolation with automatic tangent calculation based on neighboring points.
The curve is defined by a set of control points Pâ‚€, Pâ‚Â, ..., Pâ‚™ and uses the formula: P(t) = 0.5 * [(2Pâ‚Â) + (-Pâ‚€ + Pâ‚‚)t + (2Pâ‚€ - 5Pâ‚ + 4Pâ‚‚ - P₃)t² + (-Pâ‚€ + 3Pâ‚ - 3Pâ‚‚ + P₃)t³]
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
ConstructorsConstructorDescriptionCatmullRomSpline(List<Vector<Real>> controlPoints) Creates a Catmull-Rom spline with standard tension (0.0).CatmullRomSpline(List<Vector<Real>> controlPoints, Real tension) Creates a Catmull-Rom spline with custom tension. -
Method Summary
Modifier and TypeMethodDescriptionReturns the control points.intReturns the number of control points.intReturns the number of segments.Returns the tension parameter.toString()
-
Constructor Details
-
CatmullRomSpline
-
CatmullRomSpline
-
-
Method Details
-
evaluate
-
tangent
-
getNumControlPoints
public int getNumControlPoints()Returns the number of control points.- Returns:
- the number of control points
-
getNumSegments
public int getNumSegments()Returns the number of segments.- Returns:
- the number of segments
-
getControlPoints
-
getTension
-
toString
-