Skip to main content

make_parabola

Function make_parabola 

Source
pub fn make_parabola(
    vertex: Vec3,
    axis: Vec3,
    latus_direction: Vec3,
    focal: f64,
    t0: f64,
    t1: f64,
) -> Result<NurbsCurve, String>
Expand description

Exact parabola segment y² = 4·focal·x in the local frame (vertex at the origin, axis = +x, latus_direction = +y), parametrized the standard way P(t) = (focal·t², 2·focal·t) and trimmed to t ∈ [t0, t1]. A parabola segment is a plain quadratic polynomial in t (all weights 1), so a single degree-2 Bézier over the knot span [t0, t1] reproduces both the point set AND the parametrization exactly — no fitting, and evaluate(t) == P(t) for every t, not just at the ends.