RayCrafterdocumentation

Simple ray tracing with off-the-shelf optics. Very early software: expect dangerous rough edges.

What is RayCrafter?

RayCrafter is simple software for tracing rays through optical systems built from off-the-shelf parts. You pick lenses from a catalogue, drop them on an optical axis, drag them around, and watch the result update as you move them.

The RayCrafter window: a tool palette, a side view of two lenses with rays, and spot, MTF and field curvature plots below
The RayCrafter window. Left: the tools. Top: the lenses and rays. Bottom: the spot diagram, MTF and field curvature.

Very early stages of development. RayCrafter is pre-alpha. It has bugs, features are missing, and anything may change, including file formats. Please check results against other tools before you rely on them. See known problems. Detailed validation against Zemax is in the pipeline but is not yet started. Preliminary results, however, indicate good alignment with Zemax on many metrics.

It is common for custom microscopes to be designed and built around off-the-shelf components and lenses. The optical paths of these systems need to be ray-traced and analysed, but no new lenses need to be designed or optimised. RayCrafter addresses this need, as it works on the lens level rather than the surface level, as is common in software such as Zemax. Furthermore, software such as Zemax is complicated and aimed at optical engineers. Many builders of DIY microscopes are not optical engineers, and so would benefit from software that has a smaller and more tailored subset of features. Finally, RayCrafter is also aimed at being a teaching tool for students new to optical design. Students will be able to play with arrangements of ideal lenses before replacing them with real lenses to see the consequences.

RayCrafter aims to fill this gap. It allows designers to freely place lenses on an optical path and immediately see results on spot diagrams, MTF plots, etc. Lenses can be grouped into assemblies and the distances between them locked, and a chosen distance can be optimised to collimate or focus the light. A web report summarises the system, with explanatory text to help the user interpret the results. For students, teaching overlays draw the chief and marginal rays, pupils and focal points on the design, and guided tutorials build designs step by step in the program.

Current features

RayCrafter currently has:

Built on Optiland

The ray tracing itself is done by Optiland, an open-source Python optical design library. RayCrafter is a simple front end for it, aimed at people who want to build and understand a lens system rather than design one from scratch.

Where next