Ray Tracer

Inspired by a job application for the field of optical engineering I wanted to get my hands a bit dirty and write some own code to trace the path of a light beam in an optical assembly.

Unfortunately progress is slow.

The code is hosted on Launchpad.


Nested Prisms

The example shows a single beam originating from the left lower part of the scene entering a large prism (light blue, n=1.52) which contains a void (dark blue, n=1.00). The beam leaves the scene above the source on the left side.


Among the already implemented and planed features are:

  • Configurable light sources
  • Geometrical objects with fixed refractive index allowing reflection and transmission of a beam
    • Prism
    • Circle / Ellipse
    • Polygon
  • Nesting of objects
  • Placement of a detector screen somewhere in the screen