2D Time dilation simulation with several clocks?

• I
• greypilgrim
In summary, the author is looking for a simulation for time dilation where clocks can be added to a plane, synchronized, and then accelerated. There is no Twin's Paradox in the real world, so this would be a difficult task.f

greypilgrim

Hi,

I'm looking for some kind of simulation for time dilation where you can add several clocks to a 2D plane, synchronize them, give them velocities and accelerate them. For example to simulate the twin paradoxon including the acceleration necessary to (at least) one clock to reunite them.

I have no idea if something like this exists, but it would be pretty sweet.

Hi,

I'm looking for some kind of simulation for time dilation where you can add several clocks to a 2D plane, synchronize them, give them velocities and accelerate them. For example to simulate the twin paradoxon including the acceleration necessary to (at least) one clock to reunite them.

I have no idea if something like this exists, but it would be pretty sweet.
The mathematics of this is trivial, but working out how to display the results would be a nightmare IMO.

I actually started coding something similar in Java but i am not sure if i will find the motivation to finish it. It's not that it is so difficult to code, except i am a terrible coder and quite lazy too.
So here is what i was planning to do. Maybe it already exists or someone else might want to pick up on the idea before i finish it, if ever.

Basically it will be two diagrams the way i will do it. One diagram showing the inertial frame the clocks are at rest in while the other diagram will be the inertial frame in which the "travelling" twin is at rest in. Not sure yet if i will use instantaneous acceleration or do it in many discrete steps.

The diagram the clocks are at rest in will be showing the clocks moving straight down as time passes, crossing the x axis. Also in this diagram, you will be seeing the traveling twin's clock as it travels along the x axis. This would display only the instances of the traveling twin crossing the x axis.
Not sure yet if i will include future and past instances of the traveling twin similar to the clocks at rest(to the non-travelling twin). In which case you would just see the the instances of the travelling-twin with his clock moving down towards the x axis, coming from the "future", crossing the x-axis and then moving towards the past.

The diagram the traveling twin is at rest in(locally) is the interesting one. If i was to do the acceleration in many discrete steps, i would use the Lorentz transformations for the relative velocity reached after each acceleration step. You would see how events in front(acceleration direction) of the traveling twin would be measured to be moving faster down towards the negative t axis, which will explain why in spite of both twins seeing each others clocks moving slower by the same factor, the traveling twin ends up being younger still.

It's the acceleration at a distance which affects/moves instances of the clocks at rest in the non-travelling twin's frame, such that they move faster towards the negative t axis, the further away they are from the accelerating twin measured from the perspective of the accelerating twin. (they also move closer towards the accelerating twin, from his perspective).

More interesting might be to see what happens if the acceleration is done instantaneously(or almost instantaneously) but split up into many steps, such that the clocks at rest to the non-travelling twin would not be moving at all, as "no time passes", but instead one could see how from the perspective of the traveling twin the events move around just because of the acceleration, ignoring the change because of the distance traveled because of the relative velocity.
Also, connecting some events via a line, which would be their spacetime-distance might give others and myself some better understanding of what is going on.

Last edited:
Hi,

I'm looking for some kind of simulation for time dilation where you can add several clocks to a 2D plane, synchronize them, give them velocities and accelerate them. For example to simulate the twin paradoxon including the acceleration necessary to (at least) one clock to reunite them.

I have no idea if something like this exists, but it would be pretty sweet.

Are you talking about (2+1)-dimensional spacetime [two spatial and one time]? or
Or (1+1)-dimensional spacetime?

The problem is that for the clocks to differ by much more than nanoseconds, the energies required are astronomical and the distances required are large. (unless you're thinking about sub-atomic or atomic scale particles. The LHC, the biggest accelerator ever built, takes protons up to nearly c (only ~3 m/s slower than c). The Lorentz factor is huge for them, ~ 6930 (meaning 1 second experienced by the proton occurs over almost 2 hours of the rest-frame clock's time [our time].)) You probably know that there IS no Twin's Paradox, at least not in the real world. So you can't sensibly set up a graphic showing a realistic portrayal of it. There ARE a number of plots showing a spaceship (magically powered, usually, since we just don't have the ability to accelerate a macroscopic object to velocities to even 10% of c (where the Lorentz factor is a mere 1.005)) which accelerates outward, then decelerates and accelerates back to Earth, slowing to a stop. There's just no realistic way to do this. The best site I've encountered is The Relativistic Rocket, but last I checked (years ago) it only had tables. That site had the situation I described for various distances and I think it assumed a maximum acceleration of 9.8 m/s² (1 g) but that's easy enough to change.

There's two interacting requirements: specifying accelerations defines path and duration, and specifying path and duration constrains accelerations. Both interact/constrain the other. Put this another way. A graph can only show two dimensions. In this case either 1 space direction and (rest frame) time or 2 space dimensions (with time not shown). But in dynamics, in two space dimensions there are 4 variables needed (x,y,Vx,Vy) How would you give them accelerations (dv/dt's) with just 2D to work with? And no, you can NOT ignore acceleration - unless you really want inconsistent (paradoxical) outcomes. You could do it, if you made some assumptions and limited possibilities to one set of scenarios, but how easy would they be for anyone else to understand? (meaning if they're not "intuitive" they won't be useful to anyone else). Here's two possible sets (with the two clocks reading out below the diagram). 1. Specify an acceleration phase followed by coasting. 2. Specify a g force and a distance to go out to (at which point velocity is zero) and then return from under the same g force (symmetrical velocities) where final velocity is zero. 3.Another one would be to return and pass by at a very high speed...4. And another would be for the path to be a circle rather than a line segment; 5. or a square; 6. or an ellipse; or... Note that you might need 3 (or 4?) clock read-outs. 1 for frame-of-reference time (our time) 2. for the proper-time on the spaceship 3. for the time sent back to us from the spaceship and maybe 4. the time sent to the spaceship from us. The difference between the 1st pair and the 2nd is that the signal take a time of distance/c to reach the receiver, so the time will be off-set.

You probably know that there IS no Twin's Paradox, at least not in the real world. So you can't sensibly set up a graphic showing a realistic portrayal of it.
That is an odd comment to make, see below.
There ARE a number of plots showing a spaceship (magically powered, usually, since we just don't have the ability to accelerate a macroscopic object to velocities to even 10% of c (where the Lorentz factor is a mere 1.005)) which accelerates outward, then decelerates and accelerates back to Earth, slowing to a stop. There's just no realistic way to do this. The best site I've encountered is The Relativistic Rocket, but last I checked (years ago) it only had tables. That site had the situation I described for various distances and I think it assumed a maximum acceleration of 9.8 m/s² (1 g) but that's easy enough to change.
I didn't repost this initially as I think the OP wants something more interactive, but if you want to see what you say is impossible please look at these videos. All the clocks are observable all the time, from the POV of the traveler.

Hi,

I'm looking for some kind of simulation for time dilation where you can add several clocks to a 2D plane, synchronize them, give them velocities and accelerate them. For example to simulate the twin paradoxon including the acceleration necessary to (at least) one clock to reunite them.

m4r35n357
Here is my pre-pre-alpha version of what i am building,

It shows only the initial phase when the traveling twin is accelerating "instantaneously" or near instantaneously as in not having "moved" much/negligible post acceleration

watch it in HD and full screen or it will look extra ugly.

The red numbers symbolize clock counters (will be clocks with the counters included if i ever finish this code).

On the left side, no clocks are moving of course, because negligible time has passed after the near instantaneous acceleration. On the right side, you see it from the traveling twin's perspective, how acceleration transforms the coordinates of the events.

The "clock" which resides at x=4 t=8 (from the perspective of the non-travelling twin) , I marked with green color, will be at roughly x'=0 and t'=7 (cannot see the exact values from the graphic) from the perspective of the traveling twin after he finished his acceleration to vrel=0.5c.

doing the Lorentz transformations one would get

t'= γ(8 - 0.5*4) ~ 6.928... close enough to 7 i guess
x'=γ(4 - 0.5*8) = 0 as expected

In the final program, those events will be moving straight down towards the negative x-axis as "time passes".

But one can already see, that as long as there is no further acceleration, the _instance_ of the traveling twin with his clock displaying 6.928.. seconds will meet one of the clocks which are at rest to the non-travelling twin, displaying 8 seconds. Hence, one can already see that he will be younger given he would stop(accelerate back into the former inertial frame) at that point. The clock showing 8 seconds would be synced with all other clocks showing 8 seconds, while his would show 6.928.. seconds only.

As I see it, one cannot talk about future events moving towards the twin, nor can one consider the twin moving towards the future events because the instances of the twin in the "future" are events as well.

So how could the instance of the twin at t=0 (his clock shows 0) be moving towards his other instances (twin with clock showing 1 second for example). Or his instances moving towards him. It wouldn't make any sense.

In reality, nothing is moving, as far as spacetime, the 4 dimensional construct, is concerned. What moves is outside spacetime. The experiencing observer.
Like a DVD-laser reading through an already written/static DVD-movie on a DVD. The acceleration only changing the direction the laser moves through the DVD.
There is more to this, but i cannot fully wrap my mind around it.

So when "time passes" and the events are seemingly moving towards the x-axis, what is really happening is realigning the x-axis to the instance of the twin "in the present", the present being where the experiencing observer (outside spacetime) resides. Or where the laser resides if we were to go by the DVD-movie analogy.
This creates the illusion of motion and the universe changing over time, but in reality it's just one static 4 dimensional construct at least if we were to ignore QM.

Adding QM to the whole, all possible universes might exist as potential, preserving free will as in the experiencing entity(outside of spacetime) somehow being able to partly affect which of the many potential universes to actualize.

Anyway, i hope i find the motivation to finish this, so it will be showing the full twin paradox, as in initial acceleration, travelling, accelerating back and finally meeting up again. Also make it a little prettier.

The code for this in Java can be found http://pastebin.com/6MxdjNUY but be warned, it is neither complete nor pretty with known bugs (like not making sure the graphics contexts g2Dcanvas1 etc are preserved for example to keep it less cluttered until it's finished)
Feel free to do anything you want with the code even though i doubt anyone would want to touch it :D

Last edited:
Here is my pre-pre-alpha version of what i am building,

It shows only the initial phase when the traveling twin is accelerating "instantaneously" or near instantaneously as in not having "moved" much/negligible post acceleration
I think you need to make the video public . . .

I think you need to make the video public . . .

sorry for that, my first ever upload. Should be working now

Hi,

I'm looking for some kind of simulation for time dilation where you can add several clocks to a 2D plane, synchronize them, give them velocities and accelerate them. For example to simulate the twin paradoxon including the acceleration necessary to (at least) one clock to reunite them.

I have no idea if something like this exists, but it would be pretty sweet.

You talk about synchronizing clocks. This is observer dependent. Do you have an idea in mind as to how to handle that? For instance, having the frame in which the points appear to be at rest be the frame in which synchronization is done - and not be able to change that frame?

Additionally, as has been mentioned several times in other threads and many other posts, the issue of acceleration isn't particularly important to time dilation.

Rather than to get into the details of proving a negative, it might be more productive to ask people why they think acceleration should matter at all.

A graphical tool might be helpful in resolving the issue, if people had a common understanding of what the graphical tool was showing them. I'm not quite sure what sort of graphical tool would do that, to be honest.

Last edited:
A more advanced version of what i am building.
Showing how the traveling twin would measure the positions of the clocks which are at rest relative to the non-travelling twin when doing a near instantaneous acceleration where the position change would be negligible.
I added the ability to show the paths of the clocks from the perspective of the traveling twin.

A lot of work needs to be done still for the full twin paradox.

Watch it in 720p and fullscreen unless you like ugly

the code can be found here. http://pastebin.com/jvxbRy8R

But be warned. It's not even an alpha so don't run it on anything which your life depends on, like a computer controlling a nuke plant.
The easiest way to run it, would be to download the "drjava" IDE which is free (google it), then just copy and paste the code into it, and hit the buttons "compile" and then run. (might require the Java JDK to be installed on your System however)