BSpline Class Reference

An implementation of B-splines. This is a piecewise cubic spline that intersects its given end points, but does not intersect and of its intermediate control points. More...

Inheritance diagram for BSpline:
Collaboration diagram for BSpline:

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< BSpline >
 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 pointstart () const
 Return the start point. More...
 
const pointend () const
 Return the end point. More...
 
point position (const scalar lambda) const
 Return the point position corresponding to the curve parameter. More...
 
tmp< pointFieldposition (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< BSpline >
const pointFieldknots () const
 Access the end points and control points. More...
 

Detailed Description

An implementation of B-splines. This is a piecewise cubic spline that intersects its given end points, but does not intersect and of its intermediate control points.

In matrix form, the local interpolation on the interval t=[0..1] is described as follows:

P(t) = 1/6 * [ t^3 t^2 t 1 ] * [ -1  3 -3  1 ] * [ P-1 ]
                               [  3 -6  3  0 ]   [ P0 ]
                               [ -3  0  3  0 ]   [ P1 ]
                               [  1  4  1  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.

See also
CatmullRomSpline
Source files

Definition at line 67 of file BSpline.H.

Member Function Documentation

◆ position()

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 BSpline.C.

References Foam::saturationModels::A, Foam::saturationModels::B, Foam::saturationModels::D, Spline< BSpline >::end(), Spline< BSpline >::knots(), Foam::max(), Foam::min(), Spline< BSpline >::nSegments(), and Spline< BSpline >::start().

Referenced by BSplineEdge::position().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Spline() [1/3]

Inherit constructors.

Definition at line 77 of file Spline.C.

References p.

◆ Spline() [2/3]

Inherit constructors.

Definition at line 80 of file Spline.C.

◆ Spline() [3/3]

Spline
delete

Inherit constructors.


The documentation for this class was generated from the following files: