Description
Generators for primitive meshes.
README.md
simplemesh
Utility functions for the generation of primitive meshes, similar to Rust's genmesh. Ideally, I want to be able to unify shapes in gloss and apecs-physics, but for now, this is just a collection of functions that I find myself writing a lot. If you know of a more formal library (or have ideas on how to make this one more formal), let me know. If you don't know of another library and want me to push this one to Hackage, also let me know.
> vertices (rectangle 2 3)
[ V2 0.0 0.0, V2 0.0 3.0, V2 2.0 3.0, V2 2.0 0.0 ]
> edges (centeredRectangle 2 3)
[ (V2 (-1.0) (-1.5), V2 (-1.0) 1.5)
, (V2 (-1.0) 1.5, V2 1.0 1.5)
, (V2 1.0 1.5, V2 1.0 (-1.5))
, (V2 1.0 (-1.5), V2 (-1.0) (-1.5)) ]