An implementation of Catmull-Rom splines (sometimes known as Overhauser splines). This is a piecewise cubic spline that intersects all of its control points. More...


Public Member Functions | |
| point | position (const label segmenti, const scalar segmentLambda) const |
| Return the point position corresponding to the segment parameter. More... | |
| Spline (const pointField &knots, const scalar tol, const label nIter) | |
| Inherit constructors. More... | |
| Spline (const pointField &knots) | |
| Inherit constructors. More... | |
| Spline (const Spline &)=delete | |
| Inherit constructors. More... | |
Public Member Functions inherited from Spline< CatmullRomSpline > | |
| Spline (const pointField &knots, const scalar tol, const label nIter) | |
| Construct from components. More... | |
| Spline (const pointField &knots) | |
| Construct from knots with default iteration settings. More... | |
| Spline (const Spline &)=delete | |
| Disallow default bitwise copy construction. More... | |
| label | nSegments () const |
| Return the number of segments. More... | |
| const point & | start () const |
| Return the start point. More... | |
| const point & | end () const |
| Return the end point. More... | |
| point | position (const scalar lambda) const |
| Return the point position corresponding to the curve parameter. More... | |
| tmp< pointField > | position (const scalarList &lambdas) const |
| Return the point positions corresponding to the curve parameters. More... | |
| void | operator= (const Spline &)=delete |
| Disallow default bitwise assignment. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Spline< CatmullRomSpline > | |
| const pointField & | knots () const |
| Access the end points and control points. More... | |
An implementation of Catmull-Rom splines (sometimes known as Overhauser splines). This is a piecewise cubic spline that intersects all of its control points.
In matrix form, the local interpolation on the interval t=[0..1] is described as follows:
P(t) = 1/2 * [ t^3 t^2 t 1 ] * [ -1 3 -3 1 ] * [ P-1 ]
[ 2 -5 4 -1 ] [ P0 ]
[ -1 0 1 0 ] [ P1 ]
[ 0 2 0 0 ] [ P2 ]
Where P-1 and P2 represent the neighbouring points or the extrapolated end points. Reflection is used to automatically create the extrapolated end points.
Definition at line 67 of file CatmullRomSpline.H.
| Foam::point position | ( | const label | segmenti, |
| const scalar | segmentLambda | ||
| ) | const |
Return the point position corresponding to the segment parameter.
Definition at line 30 of file CatmullRomSpline.C.
References Foam::saturationModels::A, Foam::saturationModels::B, Foam::saturationModels::D, Spline< CatmullRomSpline >::end(), Spline< CatmullRomSpline >::knots(), Foam::max(), Foam::min(), Spline< CatmullRomSpline >::nSegments(), and Spline< CatmullRomSpline >::start().
Referenced by splineEdge::position().


|
delete |
Inherit constructors.