28
submitted 1 week ago* (last edited 1 week ago) by jarrydac@aussie.zone to c/science@lemmy.world

This a screenshot of an OpenGL program I wrote in my spare time during my undergraduate course to draw scenes with special-relativistic effects.

In this scene the spheres are orbiting clockwise around the centre sphere which is stationary (relative to the camera). The scene is illuminated with two black-body lights from behind the camera, and one green light from the top to show off the Doppler effect (red and blue shift).

If you are interested I have put the program on GitHub.

you are viewing a single comment's thread
view the rest of the comments
[-] unexpectedprism@programming.dev 6 points 1 week ago

It makes me think of https://gamelab.mit.edu/games/a-slower-speed-of-light/ a game where colors and shapes respect relativistic rules of light propagation.

[-] jarrydac@aussie.zone 3 points 1 week ago

I've really done a similar thing. The main inspiration for me was my special relativity class at university. I have done my lighting differently to a A Slower Speed of Light, because I've used spectrums instead of RGB: I found this stack exchange answer afterwards which outlines why that makes more sense.

[-] Danitos@reddthat.com 1 points 1 week ago

lol same game came to my mind.

[-] Cocodapuf@lemmy.world 1 points 1 week ago

Thanks for sharing that, that's cool as hell.

this post was submitted on 09 May 2026
28 points (100.0% liked)

science

27102 readers
457 users here now

A community to post scientific articles, news, and civil discussion.

dart board;; science bs

rule #1: be kind

lemmy.world rules

founded 3 years ago
MODERATORS