GeoRaytracerLite

Version 1.3 (4.42 KB) by Chris Hopkins
Geometric refractive ray tracer using NURBS surfaces
261 Downloads
Updated 28 Mar 2022

View License

Stand-alone script file to trace rays through a refractive optical system. Only on-axis systems that have spherical and flat surfaces can be modeled. The code represents surface geometry by using rational Bezier patches which is a special case of the two parameter non-uniform rational b-spline. Two tables of input data are required. "Surfaces" is the first table and includes the system prescription (similar to lens editors used with other software). "InputRays" is the second table and includes the starting position and direction of rays to be traced. Example tables are included in the code for a Double Gauss Photographic Objective. Rays outside the aperture of any surface are ignored.

Cite As

Chris Hopkins (2024). GeoRaytracerLite (https://www.mathworks.com/matlabcentral/fileexchange/81558-georaytracerlite), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018b
Compatible with R2015b and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.3

Changed array structure for wQ, wdS, & dS

1.2

Replaced sumsqr function and raised solver iteration cap to 10. Simplified some of the code. Verified compatibility with R2015b.

1.1

Version 1.1: Blocks rays that undergo total internal reflection and fixes accuracy issues for rays that are close to the edge of the clear aperture.

1.0.0