Sometimes, it’s the little things.
The SilverLining Sky, 3D Cloud, and Weather SDK has always featured a robust “ephemeris model,” accurately representing the location of the sun and moon, the phase of the moon, the positions of the stars and visible planets, and even their colors. You can even turn back the simulated time thousands of years, and see how constellations looked different due to the actual motion of the stars over time.
But there’s always been one thing we didn’t get right, until now: the orientation of the moon. While the phase of the moon has always been correct, it’s always been pointing straight up and down, which isn’t realistic.
There are fancy equations you can get to figure out the “position angle of the moon’s bright limb”, but there’s a simpler way to properly orient it, when you think about what’s going on.
Although the sun may be below the horizon, the bright side of the moon always faces the sun. SilverLining knows where the sun is on its sky dome, and it knows where the moon is. Drawing the moon’s billboard with the proper orientation isn’t much more complicated than how it worked before, it turns out. Instead of orienting the moon such that its local “up” direction points toward the zenith, we just find the vector from the sun to the moon, which serves as its local X axis. Its Z axis is defined by the vector from the moon to the center of the sky sphere, and taking the cross product gives us the Y axis used to align the moon billboard. One final cross product gives us a corrected X axis, and with that, we have everything needed to construct the moon’s billboard matrix.
Version 4.024 of SilverLining includes this change, and with it, we can finally say that everything in our simulated sky is accurate. This isn’t just important to astronomy nerds like me, it has real applications for training navigation by the stars, and for educational applications.
Clear skies!