Ray Tracer Through Lens

This program traces light rays through selected lenses.

Below you should see the ray trace applet. Otherwise reconfigure your browser.


Background -- How it works

  1. Mark the point being imaged with a dot on your figure. Using a color that approximates the wavelength you're using would be a nice touch.
  2. Draw the lens surfaces being simulated (at least 2 surfaces, each either a section of a circle or a plane)
  3. Repeat the following for a sufficient number of rays to illustrate the point without making the diagram too cluttered.
  4. Draw a line from the point being imaged to the first surface.
  5. Work out the new direction of the line from the diffraction equations and draw the line to the second surface
  6. Work out the new direction and draw a line for a sufficient distance beyond the lens to illustrate the point.
Source code (one big hack)