It's ASCII art. Drop the bitmap mask.
This looks more like what is seen during a solar eclipse.
I want the shadow that progresses across the moon to match reality. A crescent shape that always goes through the north and south poles — that flattens as it approaches a quarter moon....
At least there are no stars in the shadow, so they get partial credit.
https://en.wikipedia.org/wiki/Star_and_crescent#Contemporary...
https://slatestarcodex.com/2019/05/02/little-known-types-of-...
It took me straight back to childhood.
This is something that partially bothered me about GTA San Andreas on Ps2. They used the same trick as here but I would give them a pass because it was just a small detail on a large simulation on an already very limited system.
There are some great bones here on the site, just need to tweak the shadow and it can be a 10 out of 10.
But earth's shadows aren't what create moon phases IRL. The real moon phases are from the sun lighting the moon from different angles so this is just super weird.
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?"
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.
I have two additional feature requests:
1. Persistent URLs (replaceState)
2. Lunar eclipses
Also, given sufficient character "resolution", ASCII art approximates pixel art. This isn't very far from it, with (on my screen) characters of 3x7 pixels. And would require a 200x78 character terminal to fully display.
First, there comes a point when it’s not ascii art, it’s just dithering. The use of different colors for the characters goes even further from ascii art.
Second, opening this on my iPad results in a moon with a black crescent on the bottom and an oddly shaped dark green crescent on the left. What star system is this moon in?
Could you possibly detect the user's approximate location and rotate the whole thing 180 degrees if they're in the southern hemisphere? Down here, the moon looks technically the same, but it's 180 degrees* rotated because we're standing upside-down when we look at it. The craters are flipped and the light comes from the opposite side.
*Actually it's only rotated a full 180 degrees at opposite poles, and the exact rotation depends on your latitude. But perfect is the enemy of good etc.
We are standing the right way up your northernist simp.
They are the ones who are wrong. Never forget it.
> ASCIIMoon is a small web app that tracks the moon's phases and uses ASCII art to create a basic visual representation of the moon's current appearance based on light percentage.
> This is a personal project, and is in no way a precise representation.
https://www.moongiant.com/phase/today/ is what it should look like. The moon for July 2nd should be something that is a half circle illuminated and a half circle in the dark.
The image on asciimoon shows a circle occluding the moon where it appears that the circle occluding the moon's edge is at 50%.
I'd have to sit down and do the math, but there is way more than 51.79% illuminated in today's rendering.
While I recognize that this is a personal project and not a precise representation... it has a fair amount of work to do to make it so that the correct percentage is illuminated.
This does have some interesting JavaScript and css tricks... but it needs some more math done.
I think this is my most popular repo on github.
$ phoon
-------.
. . `--.
. . `-.
. @@@@@ `-.
@@@@@@@ . \
@@@@@@@ . \.
. @@@@@@@ O \
@@@@@@@@@@ @@@ \
. @@@@@@@@@@@@@ o @@@@|
@@@@@@@@@@@@ @@ \ First Quarter +
o @@@@@@@@ @@@@ | 0 8:26:49
. @@ . @@@@@@@ | Full Moon -
.-. @@@ @@@@@@@ | 7 16:41:45
`-' . @@@@ @@@@ o /
@@ . |
. O . o . /
. . /
_ . . .-. /'
`-' /
o O . .-'
. .-'
. .--'
-------'
$
https://github.com/Distrotech/phoonhttps://formulae.brew.sh/formula/phoon
curl https://wttr.in/Moon
It looks cool and I imagine it wasn't easy to do. And the color of the moon changes when you reload the page.
And as others have pointed out, phases don't work like that.
treve•11h ago
bombcar•10h ago
julienchastang•10h ago
flymasterv•10h ago
_joel•9h ago
supportengineer•9h ago