@@ -630,6 +630,45 @@ _Discussions:
630
630
[ /r/rust] ( https://www.reddit.com/r/rust/comments/kkf1jz/kira_game_audio_library_v030_persequence_custom/ ) ,
631
631
[ Twitter] ( https://twitter.com/tesselode/status/1342878087990685700 ) _
632
632
633
+ ### [ polyhedron-ops]
634
+
635
+ ![ polyhedron render] ( polyhedron.jpg )
636
+ _ Some brutalist polyhedron; rendered with 3Delight and post processed in Darktable._
637
+
638
+ [ polyhedron-ops] implements the [ Conway Polyhedron Operators] [ polyhedron-wiki ]
639
+ and their extensions by George W. Hart and others.
640
+
641
+ It is based on Kit Wallace’s OpenSCAD code.
642
+ As OpenSCAD Language is functional it lends itself well
643
+ to translation into functional Rust:
644
+
645
+ ``` rust
646
+ // Conway notation: gapcD
647
+ let polyhedron = Polyhedron :: dodecahedron ()
648
+ . chamfer (None , true )
649
+ . propellor (None , true )
650
+ . ambo (None , true )
651
+ . gyro (None , None , true )
652
+ . finalize ();
653
+ // Export as ./polyhedron-gapcD.obj
654
+ polyhedron . write_to_obj (& Path :: new (" ." ), false );
655
+ ```
656
+
657
+ The internal representation uses mesh buffers that need furter preprocessing
658
+ before they can be sent to a GPU
659
+ but are almost fine to send to an offline renderer, as-is.
660
+
661
+ Optionally enabled features include:
662
+
663
+ - Converting a polyhedron [ into a bevy Mesh] [ polyhedron-bevy ] .
664
+ - Sending a polyhedron to an offline renderer via the [ nsi] crate.
665
+ - Writing data out as Wavefront OBJ.
666
+
667
+ [ polyhedron-ops ] : https://github.com/virtualritz/polyhedron-ops
668
+ [ polyhedron-wiki ] : http://en.wikipedia.org/wiki/Conway_polyhedron_notation
669
+ [ polyhedron-bevy ] : https://github.com/virtualritz/polyhedron-ops/blob/76a0c4b83examples/bevy/bevy.rs
670
+ [ nsi ] : https://crates.io/crates/nsi
671
+
633
672
### [ raw-gl-context]
634
673
635
674
[ raw-gl-context] is a cross-platform library for OpenGL context creation which
0 commit comments