Lightspeed on Your Desktop
One area of physics that is hard to wrap your head around is relativity. Basically, relativity breaks down into general and special relativity. General relativity deals with large masses and high energies, and it describes how space-time is warped by these. Special relativity deals with what happens during high velocities. Many odd and counter-intuitive effects happen when speeds get close to the speed of light, or c. The problem is that these types of conditions are quite far outside normal experience, so people don't have any frame of reference as to what these effects would look like—enter Lightspeed.
Lightspeed is an OpenGL program that shows what an object would look like as it travels closer and closer to the speed of light. Lightspeed actually models four different effects that occur when you get close to the speed of light. The first effect is called Lorentz contraction. This effect causes objects to appear to shrink in the direction of travel. This is scaled by a factor called gamma. Gamma is calculated by:
1 / sqrt(1 - v2/c2).
So, as you can see, as your velocity (v) gets closer to the speed of light (c), the value gamma increases toward infinity. The length contraction is calculated by
l' = l / gamma.
This means the length of an object in the direction of travel (l) decreases toward zero as the velocity increases toward the speed of light.
The second effect that Lightspeed models is Doppler shifting. You probably have noticed the sound version of Doppler shift when a fire truck drives by with its siren on. You can hear the shift in sound frequency from high to low as it goes by. The same thing happens with light too. As a light source comes toward you, it shifts in color toward blue. As it goes away, the color shifts toward red.
The third effect is something called the Headlight effect. When you have a light source that is moving, the amount of light being emitted isn't the same in all directions if that light source is moving. If the light is coming toward you, it will appear brighter. If it is moving away from you, it will appear darker.
The last effect that Lightspeed models is something called optical aberration. Because light travels at a finite speed, the light from different parts of the object come to you at different times. The end effect is that as an object comes toward you, it looks stretched out. And, when it travels away from you, it looks squashed. This is actually different from Lorentz contraction.
So, how can you see what an object would look like, taking all of these effects into account? This is where Lightspeed comes in. Most distributions should have a package available that you can install using their package management system. If you are interested in building from source, it is hosted at SourceForge. When you first start it up, it opens with a cube set in the middle of a field made up of rods for the edges and balls for the vertices (Figure 1). The beginning velocity is set as 1m/s. Since this is an OpenGL program, you simply can grab the cube with your mouse and spin it around, or up and down, in order to change the view of the object. At the far right, you can set the velocity that the object has relative to you, going from 1m/s all the way up to 299,792,457m/s (the speed of light is 299,792,458m/s).
Figure 1. Initial Scene on Starting Lightspeed
Joey Bernard has a background in both physics and computer science. This serves him well in his day job as a computational research consultant at the University of New Brunswick. He also teaches computational physics and parallel programming.
|Red Hat Enterprise Linux 7.1 beta available on IBM Power Platform||Jan 23, 2015|
|Designing with Linux||Jan 22, 2015|
|Wondershaper—QOS in a Pinch||Jan 21, 2015|
|Ideal Backups with zbackup||Jan 19, 2015|
|Non-Linux FOSS: Animation Made Easy||Jan 14, 2015|
|Internet of Things Blows Away CES, and it May Be Hunting for YOU Next||Jan 12, 2015|
- Wondershaper—QOS in a Pinch
- New Products
- Designing with Linux
- Ideal Backups with zbackup
- Red Hat Enterprise Linux 7.1 beta available on IBM Power Platform
- Internet of Things Blows Away CES, and it May Be Hunting for YOU Next
- RSS Feeds
- January 2015 Issue of Linux Journal: Security
- diff -u: What's New in Kernel Development
- Slow System? iotop Is Your Friend
Editorial Advisory Panel
Thank you to our 2014 Editorial Advisors!
- Jeff Parent
- Brad Baillio
- Nick Baronian
- Steve Case
- Chadalavada Kalyana
- Caleb Cullen
- Keir Davis
- Michael Eager
- Nick Faltys
- Dennis Frey
- Philip Jacob
- Jay Kruizenga
- Steve Marquez
- Dave McAllister
- Craig Oda
- Mike Roberts
- Chris Stark
- Patrick Swartz
- David Lynch
- Alicia Gibb
- Thomas Quinlan
- Carson McDonald
- Kristen Shoemaker
- Charnell Luchich
- James Walker
- Victor Gregorio
- Hari Boukis
- Brian Conner
- David Lane