Implementation of functions evaluating basis splines (B-splines) and other useful functions for CAD.
Definition in file cad_helpers.hpp.
Go to the source code of this file.
Namespaces | |
mm | |
Root namespace for the whole library. | |
mm::cad_helpers | |
Namespace for helper functions used in CAD. | |
Functions | |
template<typename scalar_t , int dim> | |
Vec< scalar_t, dim > | mm::cad_helpers::evaluate_b_spline (scalar_t t, int p, const Range< Vec< scalar_t, dim >> &control_points, const Range< scalar_t > &knots, int k) |
Evaluate B-spline in one point using De Boor's algorithm - \(\mathcal{O}(d p^2)\), where \(d\) is the number of dimensions. More... | |
template<typename scalar_t , int dim> | |
Vec< scalar_t, dim > | mm::cad_helpers::evaluate_b_spline (scalar_t t, int p, const Range< Vec< scalar_t, dim >> &control_points, const Range< scalar_t > &knots, scalar_t epsilon=1e-10) |
Overload with binary search for position of t in knots . More... | |
template<typename scalar_t , int dim> | |
void | mm::cad_helpers::generate_b_spline_derivative (int p, const Range< Vec< scalar_t, dim >> &control_points, const Range< scalar_t > &knots, Range< Vec< scalar_t, dim >> &der_control_points, Range< scalar_t > &der_knots) |
Generate control points and knot vector of a B-spline that is the first derivative of the inputed B-spline. More... | |
template<typename scalar_t , int dim> | |
void | mm::cad_helpers::generate_b_spline_derivative_control_points (int p, const Range< Vec< scalar_t, dim >> &control_points, const Range< scalar_t > &knots, Range< Vec< scalar_t, dim >> &der_control_points) |
Generate control points of a B-spline that is the first derivative of the inputed B-spline. More... | |
template<typename scalar_t > | |
void | mm::cad_helpers::generate_b_spline_derivative_knots (const Range< scalar_t > &knots, Range< scalar_t > &der_knots) |
Generate knots of a B-spline that is the first derivative of the inputed B-spline. More... | |