Visualizing Lorentz Transform with Geomview and Dr. Geo


What's This and How to Use it?

[the light clocks of two systems in motion relative to each other] While preparing for a lecture about the philosophical interpretations of modern physics, I came across this very illuminating introduction to relativity by Rob Salgado (follow the "LightClocks" link). I decided to write a simple external module for geomview [geomview] using ruby [ruby] + tk [tk] , partly for my own coding entertainment and practice, and partly to show the students what one can easily achieve by combining pieces of free software to save one's own coding efforts, a powerful strategy that most proprietary software vendors don't like users to employ. Subsequently I also created a Dr. Geo [drgeo] figure that demonstrates the principle of velocity addition according to Lorentz Transform in more details. Thus this article contains some notes for readers who might be interested in one or more of the following four topics:

  1. special theory of relativity / the Lorentz Transform,
  2. how to write a simple ruby-tk program (not written yet)
  3. how to write an external module for geomview (not written yet)
  4. how to create a complicated Dr. Geo figure (not written yet)

After this introductory section, each section is devoted to a separate topic and is quite independent of the other three.

How to run it? Assuming that you are using some version of GNU/Linux like me,

  1. Download phy.tgz, a snapshot of this entire directory. (Actually not all files are needed, but I am too lazy to sort it out.)
  2. Install ruby and tk if they are not yet installed in your system. Typically they can be found in your Linux DVD. You might or might not need a separate package called ruby-tk. I keep reading from the web that ruby comes with ruby-tk, but apparently it does not seem to be the case with mandriva 2006.
  3. (Readers only interested in seeing a ruby-tk example can stop here and jump to the ruby-tk section directly.) Install geomview and all other required libraries as dictated by your system. For my mandriva 2006, I found it sufficient to install the following packages downloaded from rpmfind: libstdc++2.10-2.96-0.83mdk.i586.rpm, liblesstif1-0.93.94-4mdk.i586.rpm, geomview-1.8.1-4.i386.rpm.
  4. Extract the files from phy.tgz and you will see a directory mp/ . Start geomview from within that directory. This is essential because there is a configuration file .geomview in that directory.
  5. [the control for specifying relative speed and the reference frame] In the main window, use the mouse to rotate the pile of cones stacked against each other. Also drag the scale in the small "spec-rel controal-panel" to change the relative speed between the two frames. One can decide which frame is to be used as the reference frame using the two buttons from the same panel.
  6. For interaction with lorentz.fgeo (included in phy.tgz), one also needs to install Dr. Geo.

Notes about Relativity and Lorentz Transform

I will not repeat the excellent explanations of the special theory of relativity and the Lorentz transform found at this site, which inspired my program. Instead, I will just highly recommend it and only comment on additional things to observe from playing with spec-rel.rb.

So by now you know what a light clock is. Here we see two frames moving relative to each other at speed v, one having a yellow light clock, the other having a cyan one. We choose the direction of the relative movement as the x-axis, and the non-moving direction as the y-axis. Time is shown as the z-axis (should be "t", but I was lazy...) The relative scale between space and time is chosen so that the 45-degree directions correspond to c, the speed of light.

When you drag the scale and change v, observe that the cyan light clock becomes skewed in accordance with the Lorentz transform. Each "skewed cone" is in fact still the very same cone as the yellow one, translated, and sliced at an angle less than 45 degrees to the horizontal plane. That is, the axis of each cyan cone remains vertical, and all rulings (straight lines composing the cone) remain 45 degrees to the horizontal plane. This reminds us of the fact that the world line of a light ray is invariant viewed from whichever frame.

The depth and transparent calculation in geomview rendering does not seem to be quite correct in this picture. The cyan light clock looks as if it were behind the yellow one but in fact their overlapping portions really coincide.

[Velocity addition by Lorentz Transform]

Now let's focus on the x-t plane alone and study more details about the Lorentz Transform. We will use a figure lorentz.fgeo created using Dr. Geo for this purpose. (Thanks to Georges Khaznadar for the French translation in the Dr. Geo figure.) Here we show three frames (coordinate systems) moving relative to each other: we observe from the black frame "A", while the blue frame "B" moves at the speed of u relative to "A", and the green frame "C" moves at the speed of v relative to "B". The magnitude of u and v can be controlled by the two points on the line segment, with -c < u,v < c. We mark the unit length for frame "A" as "xA" and the unit duration of time for frame "A" as "tA". Ditto for frames "B" and "C". Finally, the yellow line is the world line of a light ray.

First let's simplify the picture a bit by making u=0 so that frame B overlaps frame A, i.e., the blue frame becomes orthogonal and coincide with the black frame. Now slide v back and forth to see how frame C changes. Notice that xC the unit point moves along a hyperbola, as it should be according to the Lorentz Transform. So does xT along another hyperbola. The large brown square mark P represents some event. Its coordinates with respect to frame B is computed as PxB and PtB. This is found by drawing two lines through B, one parallel to the xB axis, the other parallel to the tB axis. From the intersections (the small brown dots) one can compute the ratio with the unit lengths to obtain PxB and PtB. Ditto for frame C. Now you can add a few lines and points to this figure in order to test your understanding of the Lorentz Transform:

  1. Please explain the length contraction effect.
  2. Please explain the time dilation effect.
  3. Please explain the dependence of simultaneity upon the choice of the obvervation frame

You can move v along the segment to see how the amount of each effect varies with the relative speed of C to B.

One thing that puzzles most people first learning the Lorentz transform is the question: How can it be the case that things in frame B looks like shortened, slow motion in frame C's eyes, while things in frame C also (by the principle of relativity) looks like shortened, slow motion in frame B's eyes? So now we (frame A, the black frame) will catch up with frame C and observe from their eyes in order to answer this question. This is achieved by moving u away from 0 until frame C overlaps frame A, i.e., the green frame becomes orthogonal and coincide with the black frame. In fact this happens when u=-v, i.e., when B (blue) moves at speed -v relative A (black), and C (green) moves at speed v relative to B (blue). See? The situation is exactly mirrored (and I mean it geometrically, too) from C's point of view. The amount of length contraction and time dilation is exactly the same as what B observes of C, except that the obvserved direction of motion is opposite.

This Dr. Geo figure also shows that the addition of velocities under the Lorentz Transform can never exceed the speed of light, which is also (less visually) seen by the formula (u+v)/(1+uv/c^2).

Ruby-Tk

:-)

Geomview

:-)

Dr. Geo

:-)