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, const std::string &caller_name) | |
| libMesh::Point | getPoint (const libMesh::Real t) const |
| Evaluate the BSpline interpolation at given value of t. | |
Private Member Functions | |
| std::vector< libMesh::Real > | buildKnotVector () const |
| Internal method for building the knot vector given the degree and control points. | |
| std::vector< libMesh::Point > | createControlPoints () const |
| Creates a vector control points from the SplineUtils set of functions. | |
| 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. | |
| libMesh::Real | firstCoeff (const libMesh::Real t, const unsigned int i, const unsigned int j) const |
| Submethod used in CdBBasis routine. | |
| libMesh::Real | secondCoeff (const libMesh::Real t, const unsigned int i, const unsigned int j) const |
| Submethod used in CdBBasis routine. | |
Private Attributes | |
| const unsigned int | _degree |
| The polynomial degree of the B-Spline. | |
| const libMesh::Point | _start_point |
| starting point of spline | |
| const libMesh::Point | _end_point |
| ending point of spline | |
| const libMesh::RealVectorValue | _start_dir |
| starting direction of spline | |
| const libMesh::RealVectorValue | _end_dir |
| ending direction of spline | |
| const unsigned int | _cps_per_half |
| number of control points per half of the spline (vertex is auto-included) | |
| const libMesh::Real | _sharpness |
| sharpness of the curve | |
| const std::string | _caller_name |
| Name of the object working with this class, used for error reporting. | |
| const std::vector< libMesh::Point > | _control_points |
| The control points. | |
| const std::vector< libMesh::Real > | _knot_vector |
| The knot vector. | |
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, | ||
| const std::string & | caller_name | ||
| ) |
Definition at line 18 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 102 of file BSpline.C.
Referenced by CdBBasis(), and 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 116 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 128 of file BSpline.C.
Referenced by CdBBasis().
|
private |
Name of the object working with this class, used for error reporting.
Declared before the control points and knot vector because their construction may report errors
Definition at line 100 of file BSpline.h.
Referenced by buildKnotVector(), and createControlPoints().
|
private |
The control points.
Definition at line 102 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 95 of file BSpline.h.
Referenced by createControlPoints().
|
private |
The polynomial degree of the B-Spline.
Definition at line 85 of file BSpline.h.
Referenced by buildKnotVector(), and getPoint().
|
private |
ending direction of spline
Definition at line 93 of file BSpline.h.
Referenced by createControlPoints().
|
private |
ending point of spline
Definition at line 89 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 106 of file BSpline.h.
Referenced by CdBBasis(), firstCoeff(), and secondCoeff().
|
private |
sharpness of the curve
Definition at line 97 of file BSpline.h.
Referenced by createControlPoints().
|
private |
starting direction of spline
Definition at line 91 of file BSpline.h.
Referenced by createControlPoints().
|
private |
starting point of spline
Definition at line 87 of file BSpline.h.
Referenced by createControlPoints().