Back in February 2014 I have discovered that, unlike what these scary papers and presentations might make you think, programming this kind of ray tracer is really straightforward. Since then, I was contemplating doing this on GPU, but AGAL kind of sucked and I knew zero GLSL to even start. A year later, I have found this shader and decided that it looks promising, but its performance sucked on every piece of hardware I own, and I had to look for the ways to make it work faster. This did not go well, again, and I have lost my motivation soon. But now, when the hard part is done, it was simply a matter of combining all the parts together – and so I did.
Special relativity key equation builds upon the experimental fact that speed of light in empty space is constant (c = 299 792 458 m/s). It says that times (T) and distances (X) between some events, as measured by two observers, are connected by
c²T₁² – X₁² = c²T₂² – X₂²
(for events connected by light rays both sides are zeroes). The number of conclusions you can draw from this alone is fantastic. For example, if observer 1 is our spaceship, and events are its departure from Earth and arrival to some distant world, we have X₁ = 0 and X₂ = spaceship velocity times T₂ – therefore T₁ ≠ T₂ – the conclusion known as “twin paradox”. It also says that you could reach any place in the Universe in just two weeks if you fly sufficiently fast (but still slower than light), and – yes – I made space traveller calculator for that.
Any way… to be continued.