Class implementing a uniform clamped B-Spline curve. More...
#include <BSpline.h>
Public Member Functions | |
| BSpline (const unsigned int degree, const libMesh::Point &start_point, const libMesh::Point &end_point, const libMesh::RealVectorValue &start_direction, const libMesh::RealVectorValue &end_direction, const unsigned int cps_per_half, const libMesh::Real sharpness) | |
| libMesh::Point | getPoint (const libMesh::Real t) const |
| Evaluate the BSpline interpolation at given value of t. More... | |
Private Member Functions | |
| std::vector< libMesh::Real > | buildKnotVector () const |
| Internal method for building the knot vector given the degree and control points. More... | |
| std::vector< libMesh::Point > | createControlPoints () const |
| Creates a vector control points from the SplineUtils set of functions. More... | |
| libMesh::Real | CdBBasis (const libMesh::Real t, const unsigned int i, const unsigned int j) const |
| Evaluates the the basis function for a B-Spline according to the Cox-de-Boor recursive formula. More... | |
| libMesh::Real | firstCoeff (const libMesh::Real t, const unsigned int i, const unsigned int j) const |
| Submethod used in CdBBasis routine. More... | |
| libMesh::Real | secondCoeff (const libMesh::Real t, const unsigned int i, const unsigned int j) const |
| Submethod used in CdBBasis routine. More... | |
Private Attributes | |
| const unsigned int | _degree |
| The polynomial degree of the B-Spline. More... | |
| const libMesh::Point | _start_point |
| starting point of spline More... | |
| const libMesh::Point | _end_point |
| ending point of spline More... | |
| const libMesh::RealVectorValue | _start_dir |
| starting direction of spline More... | |
| const libMesh::RealVectorValue | _end_dir |
| ending direction of spline More... | |
| const unsigned int | _cps_per_half |
| number of control points per half of the spline (vertex is auto-included) More... | |
| const libMesh::Real | _sharpness |
| sharpness of the curve More... | |
| const std::vector< libMesh::Point > | _control_points |
| The control points. More... | |
| const std::vector< libMesh::Real > | _knot_vector |
| The knot vector. More... | |
Class implementing a uniform clamped B-Spline curve.
Reference used for implementation: https://mat.fsv.cvut.cz/gcg/sbornik/prochazkova.pdf The B-Spline is uniform because of the spacings in the knot vector The B-Spline is clamped because the knot vector starts (and ends) with (degree + 1) 0s (and 1s) Clamped means that it passes through the specified start and end points with specified slopes
| Moose::BSpline::BSpline | ( | const unsigned int | degree, |
| const libMesh::Point & | start_point, | ||
| const libMesh::Point & | end_point, | ||
| const libMesh::RealVectorValue & | start_direction, | ||
| const libMesh::RealVectorValue & | end_direction, | ||
| const unsigned int | cps_per_half, | ||
| const libMesh::Real | sharpness | ||
| ) |
Definition at line 20 of file BSpline.C.
|
private |
Internal method for building the knot vector given the degree and control points.
Definition at line 63 of file BSpline.C.
|
private |
Evaluates the the basis function for a B-Spline according to the Cox-de-Boor recursive formula.
| t | parameter t in [0,1] |
| i | index corresponding to which control point |
| j | degree of the basis funtion |
Definition at line 101 of file BSpline.C.
Referenced by getPoint().
|
private |
Creates a vector control points from the SplineUtils set of functions.
call SplineUtils function
Definition at line 53 of file BSpline.C.
|
private |
Submethod used in CdBBasis routine.
| t | parameter t in [0,1] |
| i | index corresponding to which control point |
| j | degree of the basis funtion |
Definition at line 115 of file BSpline.C.
Referenced by CdBBasis().
| libMesh::Point Moose::BSpline::getPoint | ( | const libMesh::Real | t | ) | const |
Evaluate the BSpline interpolation at given value of t.
| t | the parameter value, must lie in [0,1] |
Definition at line 40 of file BSpline.C.
Referenced by BSplineCurveGenerator::generate().
|
private |
Submethod used in CdBBasis routine.
| t | parameter t in [0,1] |
| i | index corresponding to which control point |
| j | degree of the basis funtion |
Definition at line 127 of file BSpline.C.
Referenced by CdBBasis().
|
private |
The control points.
Definition at line 98 of file BSpline.h.
Referenced by buildKnotVector(), and getPoint().
|
private |
number of control points per half of the spline (vertex is auto-included)
Definition at line 94 of file BSpline.h.
Referenced by createControlPoints().
|
private |
The polynomial degree of the B-Spline.
Definition at line 84 of file BSpline.h.
Referenced by buildKnotVector(), and getPoint().
|
private |
ending direction of spline
Definition at line 92 of file BSpline.h.
Referenced by createControlPoints().
|
private |
ending point of spline
Definition at line 88 of file BSpline.h.
Referenced by createControlPoints().
|
private |
The knot vector.
Size: degree + n_control_points + 1 The multiplicity of each knot influences the continuity of the spline
Definition at line 102 of file BSpline.h.
Referenced by CdBBasis(), firstCoeff(), and secondCoeff().
|
private |
sharpness of the curve
Definition at line 96 of file BSpline.h.
Referenced by createControlPoints().
|
private |
starting direction of spline
Definition at line 90 of file BSpline.h.
Referenced by createControlPoints().
|
private |
starting point of spline
Definition at line 86 of file BSpline.h.
Referenced by createControlPoints().
1.8.14