nurbspy.nurbs_basis_functions module#
- nurbspy.nurbs_basis_functions.compute_basis_polynomials(n, p, U, u, return_degree=None)[source]#
Evaluate the n-th B-Spline basis polynomials of degree ´p´ for the input u-parametrization
The basis polynomials are computed from their definition by implementing equation 2.5 directly
- Parameters:
- ninteger
Highest index of the basis polynomials (n+1 basis polynomials)
- pinteger
Degree of the basis polynomials
- Undarray with shape (r+1=n+p+2,)
Knot vector of the basis polynomials Set the multiplicity of the first and last entries equal to ´p+1´ to obtain a clamped spline
- uscalar or ndarray with shape (Nu,)
Parameter used to evaluate the basis polynomials (real or complex!)
- return_degreeint
Degree of the returned basis polynomials
- Returns:
- Nndarray with shape (n+1, Nu)
Array containing the basis polynomials of order ´p´ evaluated at ´u´ The first dimension of ´N´ spans the n-th polynomials The second dimension of ´N´ spans the ´u´ parametrization sample points
- nurbspy.nurbs_basis_functions.compute_basis_polynomials_derivatives(n, p, U, u, derivative_order)[source]#
Evaluate the derivative of the n-th B-Spline basis polynomials of degree ´p´ for the input u-parametrization
The basis polynomials derivatives are computed recursively by implementing equations 2.7 and 2.9 directly
- Parameters:
- ninteger
Highest index of the basis polynomials (n+1 basis polynomials)
- pinteger
Degree of the original basis polynomials
- Undarray with shape (r+1=n+p+2,)
Knot vector of the basis polynomials Set the multiplicity of the first and last entries equal to ´p+1´ to obtain a clamped spline
- uscalar or ndarray with shape (Nu,)
Parameter used to evaluate the basis polynomials
- derivative_orderscalar
Order of the basis polynomial derivatives
- Returns:
- N_dersndarray with shape (n+1, Nu)
Array containing the basis spline polynomials derivatives evaluated at ´u´ The first dimension of ´N´ spans the n-th polynomials The second dimension of ´N´ spans the ´u´ parametrization sample points