Warp Special Relativity Simulator
Web Warp

Lesson 4: All the Colours of the Rainbow - The Doppler Effect

Okay, those of you with good memories will recall that the teapot in Lesson 1 changed colour as we increased the speed. This is all down to the good ol' Doppler Effect. For those of you who don't know what that is, let me explain . . .

Remember the last time you heard an ambulance go by? Remember how the pitch of the siren changed as the ambulance went past? That's the Doppler effect. The sound waves emitted by the siren get squashed up as the ambulance comes towards you, and hence the siren seems high pitched. Likewise, when the ambulance has passed, the sound waves are stretched out and hence you hear a low-pitched siren.

Light also behaves like a wave (except in Quantum Mechanics, but Einstein didn't like Quantum Mechanics so we'll pretend it doesn't exist (!)). Therefore, it is subject to exactly the same effect. Light emitted from an object rushing towards us will have its waves squashed up. Hence, the colours will be shifted towards the blue end of the spectrum. Conversely, light waves from an object rushing away from us will appear redder. These changes are called blue shift and red shift respectively. At very high speeds visible light emitted by the object can be shifted out of the visible spectrum, and hence the object would not be visible to the human eye!

The original wavelength is shifted according to the following formula:

special relativity doppler effect

Here, lambda is the wavelength, v is the speed, and theta is the angle that the vector to the point on the object makes with the direction of motion (for those who are interested).

Warp simulates the Doppler effect on fast moving objects. In order to see this, try the following:

  1. Set the speed to zero and arrange the object to your preference.
  2. Press 'h'. This turns off the Headlight effect, which we are not interested at the moment, but we will come back to later.
  3. Now hold down 'a' to increase the speed slowly.
  4. As ever, use 'space' and 'return' to get the object back on the screen.

You will notice that the colour of the object slowly changes. You may even end up seeing bands of colour. This is due to the angle term in the pervious equation. You may end up seeing something like this:

doppler teapot special relativity

As you can see the object suddenly turns white (like the left hand side of the teapot above). This means that the colour has been shifted out of the optical spectrum. In reality it would no longer be visible, but Warp shows this as white to aid visibility.

The Doppler effect is the reason that Warp draws everything in green to start with. Green is in the middle of the optical spectrum, so you are able to get a good range for both red and blue shifting. However, if you are only interested in, say, blue shift (objects coming towards you), then you can change the original colour of the objects. To do this you need to use the '+' and '-' keys, which will slowly change the hue of an object until you are happy. So if you are interested in blue shifting you might want to start of with a red teapot to give yourself the largest possible colour range to play with.

teapot special relativity redshift

  • Use '+' and '-' to change the hue of the object.

However, sometimes you won't want to see the Doppler effect. After all, those colours can be a bit hard on the eyes. So . . .

  • Press 'd' to turn off the Doppler effect. Press 'd' again to turn it back on.

You now know all about the Doppler effect and how colour is used in Warp. However, you might remember that I mentioned the 'headlight effect'. Well, this is another interesting phenomena of special relativity and is the subject of the next lesson.

Previous Lesson
Next Lesson