subsphere
Sphere tessellation toolkit
This crate provides a general, easy-to-use API for working with tessellated spheres, i.e. spheres whose surface is partitioned into polygonal cells. It includes implementations for a variety of such tessellations.

Features
-
Implicit Representation: Instead of storing geometry data directly, the tessellations, and the elements within them, are represented implicitly. They are compact zero-allocation
Copytypes that can be used to generate geometry on the fly. This lets you work with massive tessellations using very little memory. -
Versatility: This crate allows you to explore a huge variety of tessellations, all sharing a common API. There's a bunch of adjustable parameters and you're free to mix-and-match topologies and projections to tune the tessellation to your needs.
-
Spherical Geometry: In the world of
subsphere, there is only one geometric space: the sphere. All objects follow the contours of the sphere, and all calculations correctly account for this.
Examples
Construct a tessellation by refining a base tessellation
let sphere = icosphere
.subdivide_edge
.with_projector
.truncate;
Construct a tessellation explicitly
let sphere = from_kis.unwrap;
Write a tessellation to an OBJ file
let mut obj = Stringnew;
for vert in sphere.vertices
for face in sphere.faces
write.expect;
Toggle neighboring faces when a face is clicked
// Setup
let mut is_active = vec!;
// For each click
let click_face = sphere.face_at;
for side in click_face.sides