example program
solar_system.grapheme
/eight planets, Newtonian gravity
A miniature solar system. The Sun sits at the center, and eight planets orbit at distances chosen so each obeys Kepler's third law: orbital period squared is proportional to semi-major axis cubed.
Each planet is shaded by view-aware Lambertian lighting, bright on the side facing the camera, dark on the far side. Per-fragment depth is correct: Mercury occludes behind the Sun. Saturn's rings are computed per-fragment by ray-casting onto the orbital plane.
code
// loading...