I am trying to construct a special relativity animated simulation, and am unclear about some aspects, please.
The animation is as follows:
From the simulation coordinate system's point of view, Einstein is stationary. Curie and Newton is onboard a train moving 1 unit/frame to the right. While on the train, Curie throws out a light moving also at 1 unit/frame to the right.
Then, we animate the situation simultaneously using 3 different "frames of reference". The top frame is from Einstein's viewpoint. The second is from Curie's viewpoint. The third if from Newton's viewpoint.
Please help correct any wrong concepts I might be harboring from this point on:
The central tenet for special relativity in this situation is that, in the case above, the speed of light seen by Einstein in this case is 2 units/frame to the right. The speed of light seen by Curie is 1 unit/frame to the right. The speed of light seen by Newton in -1 unit/frame as it is moving towards him.
The central problem in the above picture is that we do not want to allow the speed of light from Einstein's frame to be any number other than 1. Is this correct? The speed of light is calculated here by having the previous position of light stored in the "notebook" of each participant, then compared to the new position of light. Eg, for Einstein, on previous frame light is located at [2,0], and at the next frame it is located at [4,0], so the speed is calculated as 2 units/frame to the right.
Fine, we might say. If we would like the speed of light seen by Einstein to be 1 in this case, we can "contract the universe by half" along the x-axis, so the same measurement by Einstein in the new contracted coordinate be [1,0] on the earlier frame and [2,0] on the next frame, which gives the calculation we desired of speed of light = 1 unit/frame to the right, as follows:
Is this the essential thought process of special relativity in this case?
I realize that to get to a rigorous definition of this we might have to be more careful and consider the different boundary cases etc. But the essential intuition is that, we contract or expand the coordinate system/axis by the different participants in order to guarantee the result of speed of light = 1 for all parties, Einstein, Curie and Newton in this case. Is this correct?
If not, please explain the numerical derivation for how the computer (which runs the simulation) might come up algorithmically with the answer "Speed of light seen by Einstein = 1 unit/frame" in this case, without resorting to our (the simulator's) divine intervention?