Skip to content(if available)orjump to list(if available)

ASCIIMoon: The moon's phase live in ASCII art

SlowTao

While I love the ASCII art, yeah... thats not how the moon phase works. At half moon it should be exactly half occluded, so like it was cut in half, not just a weird circle cut out.

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.

kingstnap

Yeah they seem to have drawn it as a dark circle going across for some reason.

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.

andreareina

Some reason probably being that it's easier

noduerme

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 example of "what could possibly go wrong".

null

[deleted]

HumblyTossed

Yeah instead of moving a dark circle over the moon, it needs to be hinged at the north and south and rotated.

dclowd9901

Another suggestion: API so I can curl and get this in my terminal.

panzi

Yeah, was about to write the same comment.

echelon

That's a great suggestion for a more accurate render, but I want the author to know that I still think they did an amazing job. It's fun and it looks great. (Your feedback was really constructive, and I don't think the author will misinterpret it. Some of the other commenters here, on the other hand...)

I have two additional feature requests:

1. Persistent URLs (replaceState)

2. Lunar eclipses

SlowTao

Absolutely they did a fantastic job, already a hundred times better than any web stuff I have ever done.

thot_experiment

I feel like ascii art loses something when it's not sized to a standard text mode (at least to width, like 132x132 is fine). At some point you're just using weird pixels and this is approaching that for me. Same goes for changing the color of the characters continuously; terminal colors are cool. I'm probably just a crazy purist

aylons

It's not even just that: the shadows go mid-character, instead of using characters as pixels. It is just not ASCII ART at all, just some ASCII characters used as a filler.

pimlottc

And it's within a circular mask. Half the challenge of ASCII art is creating the illusion of smooth curves and edges when you mostly just have blocky letters. There's barely any attempt at smoothing the edges at all.

https://www.roysac.com/tutorial/rowanasciiarttutorial.html

Wowfunhappy

I actually feel like using color at all is cheating. I'm okay with a wider width than 132 px, but it needs to be sized such that you can clearly make out the letters, which I can't in the TFA.

angry_albatross

It seems misleading to say that this is "rendered in ASCII art"... more like the phase is being rendered, and it has an ASCII art moon background. If I copy and paste the moon text into a text editor, the phase is gone, so it's not actually part of the text.

And as others have pointed out, phases don't work like that.

_aavaa_

While cool it’s a bit of a cop out to use a bitmap as a mask for both the circular shape and the shading of the earth’s shadow.

emptybits

I agree. And if you copy and paste the ASCII moon they have there, it does already have a perfectly good circular shape to it. Well done.

It's ASCII art. Drop the bitmap mask.

ludicrousdispla

Lunar phase should be showing the moon's shadow (on itself) which will not be circular from our perspective on Earth except during the new moon phase.

This looks more like what is seen during a solar eclipse.

eichin

Yeah, this rendering is Just Wrong - moon phase is viewing a half-lit sphere from different angles, no external shadows are involved. Maybe look at https://github.com/chubin/pyphoon instead, which claims a history including Jef Poskanzer code going back to the 1970s...

way_stone

If "live in ASCII art" is the pitch, it's reasonable to expect ASCII itself being the part that is "live".

_aavaa_

But the vectors/bitmaps aren’t needed. The moon circle is already done in ascii. And the shading could at least be done with font color.

mlindner

The moon doesn't have the Earth's shadow on it though. So it's wrong in that respect too.

lifthrasiir

Besides from usual solutions like phoon, there is a winning IOCCC entry that exactly does this: https://github.com/ioccc-src/winner/blob/master/2000/natori/...

shagie

From the about page... https://asciimoon.com/about/

> 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.

p1mrx

The current shadow looks physically impossible... or it would only be possible during a lunar eclipse.

At least there are no stars in the shadow, so they get partial credit.

null

[deleted]

omoikane

divbzero

Also not possible: common representations of the star and crescent.

https://en.wikipedia.org/wiki/Star_and_crescent#Contemporary...

jpecar

Reminds me of ACME phoon ... I used to have this in my .bashrc ;) https://acme.com/software/phoon/

classichasclass

Likewise! That's what I was expecting to see.

tingletech

I made a moon phase with javascript and SVG once https://github.com/tingletech/moon-phase

I think this is my most popular repo on github.

Nition

This looks really nice (apart from the shape of the gibbous moon, but others have already pointed that out).

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.

LAC-Tech

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.

We are standing the right way up your northernist simp.

They are the ones who are wrong. Never forget it.

Nition

This is correct of course but we would only confuse the Americans.

spicybright

Seeing the shadow whip across from the css animation rule when going between waxing and waning gibus is real janky looking.

tolerance

The astronomical criticism here is warranted. But where are the usual defenders of "art" here to take arms for this project's interpretation of "ASCII Art"?

It looks cool and I imagine it wasn't easy to do. And the color of the moon changes when you reload the page.