last edited a year ago


A raytracer but with special relativity! It hasn't been a great year, but this project has been a nice silver lining. It's simple, but such a fun little project.

(The .gif shown depicts the train-tunnel paradox!)

This was for a Physics module on numerical methods, primarily for solving differential equations. With raytracing (you just trace the ray) or special relativity (you do a Lorentz transform and then trace the ray), there are no differential equations involved. I… honestly don't know how we got away with this.

All credit to my collaborators, @TheRealOrange and @chas-card, for absolutely carrying.

In the process we dealt with quite a few wonderful bugs: mostly sign errors and overflows.

We submitted this four days late and lost quite a few marks for it. (By which I mean about 40%.) Didn't really matter: we're just happy to have made something we liked.

Source