raylib boundary

Rendering adapts physics for human eyes.

The renderer converts meters into readable 3D space and never changes the simulation state it receives.

Boundary files

  • src/render/renderer.c owns raylib drawing, render-scale conversion, body colors, and grid sizing.
  • src/app/body_labels.c formats HUD labels and body names outside the physics model.
  • src/app/body_trails.c records persistent SI-unit trail history for non-star bodies.

Scale modes

Illustrative mode keeps large bodies readable and expands close moon separation only as a visual transform. Real-scale mode uses the same physical scale for positions and radii, so planets can become nearly invisible.

Both modes use the same simulation source. The difference is presentation policy at the raylib boundary.

Reference grid and trails

The ground grid expands from the farthest rendered body so later outer planets do not leave the reference frame behind. Trails are drawn as faint line segments before bodies, preserving motion history for the whole run.