Show the right moon phase for today's date, with the curved edge of the light
A calm night scene gets a nice touch when the moon matches the real calendar or your invented world's calendar. The numbers are simple, but the pictures are often wrong: the lit part drawn as a straight cut, the waxing and waning mixed up, or the phase jumping at midnight. Here is the small maths behind it.
Why this works
The moon's look repeats in a steady cycle, so today's picture needs only a date and a known starting point. The curved edge between light and dark is the half of a round ball seen from the side, which is why it bends both ways.
When not to use it
Skip it when the exact moment matters, such as a rule tied to the true full moon or a tide table: this simple count is off by about half a day. Use a real table, or invent your own world's moon.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 29 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Show the right moon phase for today's date, with the curved edge of the light" (read_entry moon-phase-from-the-date-with-a-curved-edge) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP