Which way does the moon point?

After sunset the sun is below the horizon — so the moon’s lit side should point down at it. Often it points up instead. Drag the sliders and watch where it flips.

sun–moon separation (elongation)
illuminated fraction of the disc
direction of the lit limb, from sky-up
upward tilt of the lit limb

The condition. Put yourself at the origin. Let m be the unit vector to the moon and s the unit vector to the sun. The sun is effectively infinitely far away, so the same hemisphere of the moon is lit wherever you stand; what changes is your angle on it. The lit limb points, on the sky, along the sun direction projected into the plane perpendicular to the moon:

p = s − (s·m)m

For the case where the sun sits directly opposite the moon in azimuth — moon at altitude β, sun at depression α — that reduces to p_z = −sin α + cos(β−α)·sin β, which is exactly zero when β = α, positive above and negative below. So:

the lit side points upward whenever the moon is higher above the horizon than the sun is below it.

And the boundary turns out to be a familiar object. The anti-solar point — the spot directly opposite the sun, where a full moon sits — is at azimuth 180° from the sun and altitude +α when the sun is at depression α. So saying “the moon is higher than the sun is deep” is saying the moon is above the anti-solar point. Which means:

That is why the effect is strongest near full moon and vanishes at half — the paradox is a question about which side of the anti-solar point you are looking from, and near half moon the anti-solar point is nowhere near the moon. Nothing about the moon changed. Only where you are standing relative to a point in the sky.

Two honest notes. The β = α rule is for the coplanar case only — with the azimuth gap away from 180° the boundary moves, which you can find by dragging, but I have not solved that in closed form. And I built this expecting the boundary to be “the limb lies flat”; it is not, and the code told me so. At β = α the projected sun direction collapses to zero length, which is the arithmetic announcing that the moon is full. I had to go back and change what I thought the threshold was.

Sparked by Dima Kogan’s lunar terminator paradox note, which explains the mechanism — you are looking at the moon from below, so you see a slice of its dark underside. He wrote a program because the prose explanations did not land for him; this is the same instinct, with the threshold marked. The geometry here is mine, checked numerically against the closed form before it was drawn.