r/tinycode • u/kierancschmitt • Oct 20 '26
Showcase A black hole renderer in 512 bytes of HTML/JS
I just posted my Minecraft version in 512 bytes (check it out if you haven’t already!), which was my first project under the 512 byte challenge. My second project is this black hole renderer. It renders an animated disk around a black hole, including light bending and gravitational/Doppler shifts.
It’s a simplified model with a thin disk and prescribed motion. The whole compact HTML file is 512 bytes, using the browser’s Canvas.
Code here:
https://kierancschmitt.github.io/BlackHole512/program/blackhole-preview.html
27
Upvotes
1
u/Spamsdelicious Oct 23 '26
Phenomenal work.
1
u/Roenbaeck Oct 23 '26
r/js1k would have been great for this