Expand description
Polyhedra is a small library for creating polyhedra. It currently can create the basic platonic solids, geodesic polyhedra based on the icosahedron and their respective Goldberg polyhedra.
Polyhedra allow access to their basic information (vertices, edges and faces) and can be converted into graphs based on the petgraph library.
§Example
use polyhedra::VertexGraph;
use polyhedra::geodesic::build_icosahedral_goldberg;
let subdivisions = 2;
let goldberg = build_icosahedral_goldberg(subdivisions);
let graph: VertexGraph = goldberg.into();
Modules§
- geodesic
- Contains functionality to create geodesic polyhedra and goldberg polyhedra.
- platonic_
solids - This module contains functions to create the basic platonic solids.
Structs§
- Face
- Represents the face of a polyhedron. Faces can be arbitrary polygons.
- Polyhedron
- Represents an arbitrary polyhedron. It provides access to information about vertices, edges and faces, their relation to each other and their positions in 3D space.
- Vertex
Handle - Handle to a vertex in a polyhedron. Must only be used with the polyhedron it was received from.
Type Aliases§
- Vertex
Graph - Graph representation of a
Polyhedron