Skip to main content

exact_plane_section

Function exact_plane_section 

Source
pub fn exact_plane_section(
    surface: AnalyticSurface<'_>,
    normal: Vec3,
    d: f64,
) -> Result<Vec<PlaneSection>, MathError>
Expand description

A plane’s exact section of an analytic surface.

It includes the sections exact_plane_analytic has no curve for: the rulings a plane along a cylinder’s axis or through a cone’s apex cuts, and the point where a plane touches a sphere or meets a cone at its apex alone. A cone’s parabola and hyperbola come back as curves, which exact_plane_analytic samples into points, except in a band about the parabola where neither form keeps its digits.

The plane is dot(normal, p) = d, with normal of unit length.

§Errors

Returns an error if a section’s curve cannot be built.