- #1

- 4

- 0

The main problem is computing where something appears to be from the perspective of the user.

The speed of light is not infinite. So when you look at something, you see it where it used to be. Ignoring special relativity, but still including a finite speed of light, let's compute where you see it. Let p(T) be the location of the object at time T. Let u(T) be your location at time T.

Let T be how "late" the image of the object is: right now, you see the object where it was at time (now-T).

Let c be the speed of light in meters per second. Assume that all distance/location units are in meters.

Light travels at the speed of light. Therefore, T seconds ago, the light that you are seeing now was T*c light-seconds away.

distance( p(now - T), u(now) ) = c * T

Assuming that the object in question never moves faster than the speed of light, this equation always yields a unique satisfying T. For my purposes, this is enough to compute T.

This part already works.

Suppose you're in a spaceship moving near the speed of light and you emit a flash of light in all directions around you. Under special relativity, from your perspective, the light beams should always look like they are centered around you, even as you move, because that's what it would look like if you were stationary. However, in the simulation, they do what you would expect in Newtonian mechanics: they form a sphere around the location that you emitted them from. So it's not right yet.

----

I compute everything relative to a nonaccelerating global reference frame. When I want to draw something, I compute where it should appear to be in the reference frame of the user. Similarly, I alter the time-step of the program so that when the user is travelling close to the speed of light, stationary clocks appear to move faster.

Let's have a short thought experiment to defend this model. Suppose there's a spaceship A, a spaceship B, and an observer O. A and B are both moving near the speed of light. Suppose we want to know where B appears to be from A's perspective. All we have to do is use O's information about A and B's locations over time: the time that A sees the image of B is the time that O sees A seeing the image of B. To convert that time into A's perspective, all we have to do is compute how much time A has observed passing since T_0.

Keep in mind that all of that holds even if A and B are acclerating.

If you have an event E that happens at time T and location x,y,z in the global reference frame, and the user's velocity (as observed by the global reference frame) is Vx, Vy, Vz, then I understand that you apply the Lorentz transformation to get T', x', y', z', the location of E in spacetime according to the user's reference frame.

So here's the question: given the posititions of A and B for all T up to now (in the global reference frame), where does B appear to be from A's perspective in A's reference frame, taking both special relativity and speed of light delay into account? Does the Lorentz transformation hold for an accelerating observer?