Last couple of analytics. Finished Milestone 1

This commit is contained in:
connor committed 2026-10-14 19:22:36 -04:00
1 parent d08bc33e8d
commit 5b802b4455
3 files changed
+345 -2

No files matched your search

+10
View File
@@ -433,6 +433,16 @@ the surface normal and the Sun. The night side has i past 90 degrees and is
black. The Sun's distance d is taken from each body's center, since the
difference across a body is a few parts in 10^5.
The total light a sphere sends a far-away camera has a closed form. A
Lambertian sphere of albedo rho and radius R, at distance D, delivers an
irradiance of (2/3) rho E (R/D)^2 Phi(alpha), where alpha is the phase angle
(Sun-sphere-camera) and Phi(alpha) = (sin alpha + (pi - alpha) cos alpha) / pi.
It falls from 1 at full phase to 0.61 at 60 degrees and 0.11 at 120 degrees.
Up close it is not exact: the near side of the sphere is nearer the camera
than its center, so it counts for more. At 40,000 km from the Moon (R/D =
0.043), the real total is 3 % above the formula. The renderer's image agrees
with the exact surface integral to 0.03 % or better (`tests/analytic.rs`).
This gets the overall brightness and the phase (how much of the disk is
lit) right. It misses some things that are visible in real images: