Skip to main content

intersect_plane_cylinder

Function intersect_plane_cylinder 

Source
pub fn intersect_plane_cylinder(
    cyl: &CylindricalSurface,
    normal: Vec3,
    d: f64,
) -> Result<Vec<IntersectionCurve>, MathError>
Expand description

Intersect a plane with a cylindrical surface.

For each u in [0, 2pi), the cylinder point is linear in v, so the plane equation dot(normal, P(u,v)) = d is linear in v and can be solved directly.

ยงErrors

Returns an error if curve fitting fails.