Skip to main content

make_ellipse_arc

Function make_ellipse_arc 

Source
pub fn make_ellipse_arc(
    center: Vec3,
    major_direction: Vec3,
    minor_hint: Vec3,
    semi_major: f64,
    semi_minor: f64,
    start_angle: f64,
    end_angle: f64,
) -> Result<NurbsCurve, String>
Expand description

The arc of the ellipse about center with semi-axis semi_major along major_direction and semi_minor square to it (toward minor_hint), from the parameter start_angle to end_angle (radians) of P(t) = center + semi_major·cos t·x + semi_minor·sin t·y.

Exact: an ellipse is a circle’s affine image, and an affine map carries a rational curve’s poles and keeps its weights, so this is the unit circle’s arc (make_arc) with each pole stretched onto the two semi-axes. Either semi-axis may be the longer.