Skip to content


Repository files navigation

Build-Status Docs Version Contributors Forks Stargazers Issues MIT License Style Supported Versions


The Python Ray Tracer.
« Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

About The Project

PyRayT is a geometric ray tracing package for optical system design. Unlike most ray tracers which focus on rendering scenes 3D scenes, PyRayT tracks every ray as it propagates through the system, storing refractive index, intersection, and collision information. This information is saved in a Pandas dataframe which can be filtered and analyzed after a trace is complete.

All components are objects that can be manipulated in 3D space, and numpy is used extensively under the hood to enable fast simulations, even when simulating 100k+ rays.

project image

Getting Started

You can install PyRayT from PYPI with

py -m pip install pyrayt

For full installation instructions, follow the Installation guide in the documentation.


A full tutorial can be found in the documentation covering the design and analysis of a condenser lens.


PyRayT is currently in active development. Below are a couple planned features for future releases:

  • Support for absorbing (k!=0) materials
  • Full 3D rendering of Simulation Results (think Zemax)
  • Exporting designs to a portable format and reloading previous simulations
  • Filtering what Rays are shown in a Ray Trace

See the open issues for a list of proposed features (and known issues).


Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request


Distributed under the MIT License. See LICENSE for more information.


Ryan Frazier - @FotonixAndGizmo

Project Link: