Description
Tools for evaluating basis functions for B-splines, parametrized with parameter u (as lines) These bases are often called "N" in literature.
#include <ChBasisToolsBSpline.h>
Static Public Member Functions | |
static int | FindSpan (const int p, const double u, const ChVectorDynamic<> &knotU) |
Find the knot span of a b-spline given the parameter u, the order p, the knot vector knotU. More... | |
static void | ComputeKnotUniformMultipleEnds (ChVectorDynamic<> &knotU, const int p, double kstart=0.0, double kend=1.0) |
Compute uniformly-spaced k knots (in range [kstart, kend]) for open Bsplines, with order p. More... | |
static void | ComputeKnotUniform (ChVectorDynamic<> &knotU, const int p, double kstart=0.0, double kend=1.0) |
Compute uniformly-spaced k knots (in range [kstart, kend]) for Bsplines, with order p. More... | |
static void | BasisEvaluate (const int p, const int i, const double u, const ChVectorDynamic<> &knotU, ChVectorDynamic<> &N) |
Compute vector of bases N. More... | |
static void | BasisEvaluateDeriv (const int p, const int i, const double u, const ChVectorDynamic<> &knotU, ChMatrixDynamic<> &DN) |
Compute bases and first n-th derivatives of bases dN/du and ddN/ddu etc, arranged in a matrix. More... | |
Member Function Documentation
◆ BasisEvaluate()
|
inlinestatic |
Compute vector of bases N.
Evaluate ALL the p+1 nonzero basis functions N of a b-spline, at the i-th knot span, given the parameter u, the order p, the knot vector knotU. Results go into the row vector N = { N1, N2, N3.... N_(p+1) }
- Parameters
-
p order i knot span, assume aready computed via FindSpan() u parameter knotU knot vector N here return basis functions N evaluated at u, that is: N(u)
◆ BasisEvaluateDeriv()
|
inlinestatic |
Compute bases and first n-th derivatives of bases dN/du and ddN/ddu etc, arranged in a matrix.
Evaluate derivatives of ALL the p+1 nonzero basis functions N of a b-spline, at the i-th knot span, given the parameter u, the order p, the knot vector knotU. Results go into the ChMatrixDynamic<> , where j-th derivative is j-th row: DN = | N1, N2, N3, ...., N_(p+1) | | dN1/du, dN2/du, dN3/du, ...., dN_(p+1)/du | | ddN1/ddu, ddN2/ddu, ddN3/ddu ...., ddN_(p+1)/ddu | The derivative order ranges from 0 (no derivative) to d, where d is the number of rows of the passed DN matrix. Usually two rows, for N and their shape derivatives.
- Parameters
-
p order of spline i knot span, assume aready computed via FindSpan() u parameter knotU knot vector DN here return derivatives evaluated at u, that is: dN/du(u)
◆ ComputeKnotUniform()
|
inlinestatic |
Compute uniformly-spaced k knots (in range [kstart, kend]) for Bsplines, with order p.
If you need that the spline starts and ends exactly at the 1st and last control point, use ComputeKnotUniformMultipleEnds instead. This is often used when creating closed splines, where the last and first p control points will overlap.
- Parameters
-
knotU knot vector p order kstart range start kend range end
◆ ComputeKnotUniformMultipleEnds()
|
inlinestatic |
Compute uniformly-spaced k knots (in range [kstart, kend]) for open Bsplines, with order p.
Assuming the size of knotU is already k=n+p+1 for n control points. The p+1 initial and end knots are made multiple.
- Parameters
-
knotU knot vector p order kstart range start kend range end
◆ FindSpan()
|
inlinestatic |
Find the knot span of a b-spline given the parameter u, the order p, the knot vector knotU.
- Parameters
-
p order u parameter knotU knot vector
The documentation for this class was generated from the following file:
- /builds/uwsbel/chrono/src/chrono/geometry/ChBasisToolsBSpline.h