Pict3D: Functional 3D Scenes
Pict3D is written in Typed Racket, but can be used in untyped Racket without significant performance loss.
(require pict3d) | package: pict3d |
Pict3D provides a purely functional interface to rendering hardware, and is intended to be a performant, modern 3D engine. It’s getting there.
In a 3D scene, solid colors alone are insufficient to indicate the shapes of objects.
Unlike 2D scenes, 3D scenes must be projected onto two dimensions for display. The projection isn’t unique, so displaying a 3D scene requires additional information.
In 3D, it’s possible to create combiners that stack scenes vertically and horizontally. Unfortunately, there would be nine for each axis, to line up corners, edges, and centers, for a total of 27.
Pict3D makes no distinction between development and production/deployment. All functions for developing scenes are available during runtime, and vice-versa.
The procedures used to create and update scenes are purely functional.