An implementation of Bsplines. More...
Public Member Functions  
BSpline (const pointField &knots, const bool notImplementedClosed=false)  
Construct from components. More...  
point  position (const scalar lambda) const 
The point position corresponding to the global curve parameter. More...  
point  position (const label segment, const scalar lambda) const 
scalar  length () const 
The length of the curve. More...  
Public Member Functions inherited from polyLine  
polyLine (const pointField &points, const bool notImplementedClosed=false)  
Construct from components. More...  
polyLine (const point &start, const pointField &intermediate, const point &end, const bool notImplementedClosed=false)  
Construct from begin, intermediate, end points. More...  
const pointField &  points () const noexcept 
Return constaccess to the controlpoints. More...  
label  nSegments () const noexcept 
The number of line segments. More...  
point  position (const scalar) const 
The point position corresponding to the curve parameter. More...  
point  position (const label segment, const scalar) const 
The point position corresponding to the local parameter. More...  
scalar  length () const noexcept 
The length of the curve. More...  
Additional Inherited Members  
Static Public Member Functions inherited from polyLine  
static tmp< pointField >  concat (const point &start, const pointField &intermediate, const point &end) 
Concatenate begin, intermediate and end points. More...  
Protected Member Functions inherited from polyLine  
void  calcParam () 
label  localParameter (scalar &lambda) const 
Protected Attributes inherited from polyLine  
pointField  points_ 
The control points or ends of each segments. More...  
scalar  lineLength_ 
The real (total) line length. More...  
scalarList  param_ 
The rational (01) cumulative parameter value for each point. More...  
An implementation of Bsplines.
In this implementation, the end tangents are created automatically by reflection.
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 ] * [ P1 ] [ 3 6 3 0 ] [ P0 ] [ 3 0 3 0 ] [ P1 ] [ 1 4 1 0 ] [ P2 ]
Where P1 and P2 represent the neighbouring points or the extrapolated end points. Simple reflection is used to automatically create the end points.
The spline is discretized based on the chord length of the individual segments. In rare cases (sections with very high curvatures), the resulting distribution may be suboptimal.
A future implementation could also handle closed splines.

explicit 
Foam::point position  (  const scalar  lambda  )  const 
The point position corresponding to the global curve parameter.
0 <= lambda <= 1
Definition at line 45 of file BSpline.C.
References UList< T >::first(), lambda(), UList< T >::last(), mu, and points.
Foam::point position  (  const label  segment, 
const scalar  lambda  
)  const 
The point position corresponding to the local lambda (01) on the given segment
Definition at line 63 of file BSpline.C.
References UList< T >::first(), UList< T >::last(), mu, p0, and points.
Foam::scalar length  (  )  const 
The length of the curve.
Definition at line 134 of file BSpline.C.
References NotImplemented.
Referenced by BSplineEdge::length().