vm6502q / OpenRelativity

An open source framework to add the effects of traveling at relativistic speeds to visualizations or games
17 stars 2 forks source link

Angular velocity Doppler shift #33

Open WrathfulSpatula opened 3 years ago

WrathfulSpatula commented 3 years ago

One of the earliest things I attempted to do with the original OpenRelativity shader was to try to incorporate Lorentz transformation for angular velocity. I did it incorrectly, though. Angular velocity implies a (centripetal) tangential acceleration, and the usual Lorentz transformation code doesn't handle this change of tangential velocity in time, (though it's basically the same principle as the now-included "relativistic rocket" handling for translational acceleration). It's worth linking to the wikipedia page for the Ehrenfest paradox, which states that the radius of a spinning disk is at a right angle to tangential velocity (at all points on the disk) and therefore does not "length contract," while circumference is apparently warped by the velocity, (as the player would "stay put" on its surface as the worldline). Therefore, a spinning sphere at translational rest with respect to the player should appear as having its "proper" radius, as at rest, it seems. However, the Doppler shift of points with angular velocity appears as the relativistic sum of the translation and angular tangential velocities.

This is extremely expensive for the shader to simulate, at least compared to its typical magnitude of detectable effect. Basically, I don't think it's worth it for typical video game development purposes. However, it should be noted that this physical correction has not been made in the shader.

The Lorentz transformation would still happen as according to the translational velocity, but the Doppler shift (in the fragment shader) should be calculated as per the relativistic velocity sum of translational and angular tangential components.