Skip to main content

generate_bspline_path

Function generate_bspline_path 

Source
pub fn generate_bspline_path(
    control_x: &[f64],
    control_y: &[f64],
    n_path_points: usize,
    degree: usize,
) -> Option<BSplinePath>
Expand description

Generate a B-spline path from control points.

§Arguments

  • control_x - x coordinates of control points
  • control_y - y coordinates of control points
  • n_path_points - number of points to sample along the path
  • degree - B-spline degree (must satisfy 1 <= degree <= n_control_points - 1)

§Returns

A BSplinePath containing the sampled path, heading, and curvature, or None if the inputs are invalid.