Skip to main content

Crate use_regular_polytope

Crate use_regular_polytope 

Source
Expand description

§use-regular-polytope

Regular polytope primitives for the RustUse geometry workspace.

use-regular-polytope groups regular polygons, Platonic solids, and the convex regular four-dimensional polytopes. Named objects such as the 24-cell, 600-cell, and 120-cell are represented inside this family crate rather than as standalone crates. Schlafli notation is provided by the use-schlafli crate.

§Example

use use_regular_polytope::{PlatonicSolid, RegularPolygon, RegularPolytope4};

let polygon = RegularPolygon::new(6, 2.0).expect("valid polygon");

assert_eq!(polygon.side_count(), 6);
assert_eq!(PlatonicSolid::Icosahedron.face_count(), 20);
assert_eq!(RegularPolytope4::TwentyFourCell.schlafli_symbol().to_string(), "{3, 4, 3}");

Structs§

FiveCell
Marker for the 5-cell.
OneHundredTwentyCell
Marker for the 120-cell.
RegularPolygon
A regular polygon descriptor.
SixHundredCell
Marker for the 600-cell.
SixteenCell
Marker for the 16-cell.
Tesseract
Marker for the tesseract.
TwentyFourCell
Marker for the 24-cell.

Enums§

PlatonicSolid
The five Platonic solids.
RegularPolytope
A regular polytope descriptor across common dimensions.
RegularPolytope4
The six convex regular four-dimensional polytopes.

Type Aliases§

RegularPolytope2
Two-dimensional regular polytopes are regular polygons.
RegularPolytope3
Three-dimensional regular polytopes are the Platonic solids.