This applet was borrowed from Light and Matter