Table of contents

Definition

In photonics/optical engineering software, ray tracing is a technique used to represent the propagation of electromagnetic (optical) wavefronts through a system. Rays are lines constructed using discrete points on surfaces representing the local wavefront position as it propagates through an optical system.   

These rays, which are perpendicular to the local wavefront, travel in straight lines through homogenous media. The rays will change direction at refractive boundaries per Snell's Law and reflect at boundaries per the Law of Reflection. They will change direction at diffractive interfaces according to the vector grating diffraction equation and within inhomogeneous media via equations that govern gradient index materials.   

When rays interact with scattering surfaces, they will be modified according to equations that govern scatter. Additional properties can be associated with rays, such as intensity, polarization properties, and "optical path" (the physical path multiplied by the refractive index of the medium), and these can be appropriately modified at interfaces as well.   

Figure 1. Examples of tracing rays through an optical system | Synopsys
Figure 2. Examples of tracing rays through an optical system | Synopsys

Examples of tracing rays through an optical system

What problem does ray tracing solve?

With ray tracing, it is possible to simulate the behavior of optical wavefronts through various mediums. Ray tracing makes it possible to determine the quality of the rendered image for image-forming systems, the distribution of light for illuminations systems, and much more. Ray tracing, combined with optimization of the optical system parameters, can automatically improve the imaging or illumination performance, to achieve desired goals.  

Ray tracing results can be used for many diagnostic and analysis purposes. For example, the size of the image quality for a microscope objective can be estimated by tracing rays through it in reverse, to see how well the light focuses.

Cutaway view of a microscope objective, focusing rays at points under a cover glass. | Synopsys

Cutaway view of a microscope objective, focusing rays at points under a cover glass.

Light on axis comes to a tight focus for rays traced through the microscope objective | Synopsys

Light on axis comes to a tight focus for rays traced through the microscope objective       

The diffraction limited spot size is denoted by the circle in the drawing. The points show intersections of rays traced to focus for different wavelengths (colors) of light, in this case red, green and blue. This type of intercept plot, (commonly called a spot diagrams), is a common diagnostic tool used in optical design.

The behavior of traced rays can also be optimized to achieve a desired light distribution or spot size. A benefit of ray tracing within software is that the process can be heavily parallelized (and sped up via other methods), allowing much faster simulations than would otherwise be possible.  

In imaging software, a relatively small number of rays are needed for an accurate simulation (10 – 1000 rays). The goal of designing imaging systems is to get the best image possible. Typical performance metrics are modulation transfer function (MTF), point spread function, and spot size. 

For illumination software, you are trying to control the distribution of light and are typically not concerned with forming an image. In this case, you’ll need many more rays, which are typically traced (1000 to millions) with a process called a Monte Carlo simulation. You define a light source, trace millions of rays, and optimize the system to make a desired illumination pattern.

Why is ray tracing important for optical simulation?

Ray tracing is an important simulation technique based on its relative accuracy (for many situations) combined with its general computational efficiency, compared to more rigorous methods of propagating electromagnetic waves. Ray tracing can be combined with other computational algorithms to more accurately simulate physical phenomenon. For example, a grid of rays can be traced to the exit pupil of an optical system with the intensity (amplitude**2) and phase (optical path) for each ray tracked. A Fourier Transform of the complex field (amplitude and phase) will simulate the intensity of the image structure, including diffraction.

Which Synopsys ray tracing solution is right for me?

When designing optical systems, engineers need powerful and robust software to achieve fast and accurate results. Reliable optical designs optimized in less time is a wise investment that saves time, money, and sustains your company’s bottom line. Synopsys’ portfolio of ray tracing software is developed with this in mind and addresses the need for superior optical designs. Choosing the right software depends on your application.

  • If you need software to model imaging or free-space telecommunication systems, Synopsys CODE V is a computer aided design software used to model, analyze, optimize, and provide fabrication support for the development of optical systems for applications such as aerospace, cameras, information display, microlithography, and photonics.
3D View of a wide angle receiver, simulated in CODE V | Synopsys

3D View of a wide angle receiver, simulated in CODE V

  • For designing general lighting, backlit displays, LEDs, vehicle interior lighting, Synopsys LightTools illumination design software models and optimizes illumination system designs.
LiDAR optical system, simulated in LightTools | Synopsys

LiDAR optical system, simulated in LightTools

  • For modeling the design and real-time simulation of automotive forward, rear, and signal lighting, Synopsys LucidShape software provides a complete set of design, simulation and analysis tools.
Deep FFD Reflector, simulated in LucidShape | Synopsys

Deep FFD Reflector, simulated in LucidShape

  • If your lens system needs to be simulated using ray tracing techniques and the geometry size scale is smaller, passing field data between simulators, or hybrid simulation, may be ideal. RSoft Photonic Device Tools contain an interface to convert the output from CODE V, and vice versa.
One example of ray tracing techniques in a real-world situation involves a CODE V software user, NWS Instruments AG, who make high-performance, ergonomic optical and mechanical instrument systems for commercial and technical photography. Dr. Christoph Horneber, a co-founder of NWS Instruments AG and designer of the iconic Leica 0.95 Noctilux lens, used CODE V to design, optimize, and provide fabrication support for NWS’ groundbreaking new wide-angle and telephoto lenses.

Basic ray tracing workflow

One example of ray tracing techniques in a real-world situation involves a CODE V software user, NWS Instruments AG, who make high-performance, ergonomic optical and mechanical instrument systems for commercial and technical photography. Dr. Christoph Horneber, a co-founder of NWS Instruments AG and designer of the iconic Leica 0.95 Noctilux lens, used CODE V to design, optimize, and provide fabrication support for NWS’ groundbreaking new wide-angle and telephoto lenses.

  • The sophisticated design of the 23APO provides 120 lp/mm resolution with at least 50% MTF and a 70 mm image circle. The instrument has a fully manual aperture and focusing control to ensure its compatibility with all camera systems. Other innovative features include a built-in leveling feature invented by NWS, as well as a 2mm-thick reversible and retractable lens hood. Applications include architectural, automotive, industrial, and landscape photography.

  • The 110APO macro telephoto lens features 120 lp/mm resolution and a 55 mm image circle, and also includes fully manual aperture and focusing controls. The instrument has a torque adjustment knob feature invented by NWS to facilitate precise, fine focus adjustments. Applications include advertising, automotive, jewelry, and industrial photography.

The basic workflow is as follows:

  • Define optical system parameters and requirements
  • Select a suitable starting point (sample lens, patent lens database, previous company portfolio)
  • Set up model geometry for initial ray trace according to requirements
  • Examine performance against requirements, and set up optimization for improvement
  • Optimize the system and check performance, including tolerance analysis - continue in a feedback loop until requirements are met
  • Save model and send to manufacturer

Going beyond ray tracing

Additional modules, features, and tools allow for all aspects of ray tracing for even the most challenging of designs. Synopsys software has the flexibility and additional features that engineers need to optimize designs:

  • Extensive built-in libraries
  • Non-sequential surface modeling for unusual systems
  • Fast 2D image simulation to visualize optical system performance
  • Stray light analysis 
  • Enhanced backlight pattern optimization
  • Freeform design capabilities to provide more granular control over light spread
  • Enhanced visualization and accurate photorealistic computer-generated images

Explore Synopsys Optical Solutions Software