Expand description
Sphere primitives.
Examples
Generating a graph from the positional data of a $uv$-sphere.
use decorum::N64;
use nalgebra::Point3;
use plexus::graph::MeshGraph;
use plexus::index::HashIndexer;
use plexus::prelude::*;
use plexus::primitive::generate::Position;
use plexus::primitive::sphere::UvSphere;
type E3 = Point3<N64>;
let mut graph = UvSphere::new(16, 8)
.polygons::<Position<E3>>()
.collect_with_indexer::<MeshGraph<E3>, _>(HashIndexer::default())
.unwrap();