Skip to main content

torus

Function torus 

Source
pub fn torus<T: Number>(
    major_radius: T,
    minor_radius: T,
    major_segments: usize,
    minor_segments: usize,
) -> Csg<T>
Expand description

Create a torus centered at the origin, lying in the XZ plane (tube wraps around the Y axis).

  • major_radius: distance from the center of the torus to the center of the tube
  • minor_radius: radius of the tube
  • major_segments: divisions around the ring (around Y axis)
  • minor_segments: divisions around the tube cross-section