▲ | andreareina 2 days ago | |||||||
Some reason probably being that it's easier | ||||||||
▲ | noduerme 2 days ago | parent | next [-] | |||||||
yet an incredibly basic and stupid oversight when the only point of your site is to show the phase of the moon. I'm voting that this was vibe-coded by an LLM on behalf of someone who not only didn't write the code but didn't bother to look at a picture of the moon or look at the sky before deploying it. If so, it's almost the perfect Platonic example of "what could possibly go wrong?" | ||||||||
| ||||||||
▲ | kingstnap 2 days ago | parent | prev [-] | |||||||
The math isn't that bad if anyone wants to do it properly. Assume y vertical and x horizontal and z out of the page. The moon is a disk. x^2 + y^2 <= R^2 For all the points, calculate z = sqrt(R^2 - y^2 - x^2) Let the vector v(theta) = <sin(theta), 0, cos(theta)> point to the Sun. Points <x,y,z> • v(theta) >= 0 should be bright, The rest dim. | ||||||||
|