We present GeoRay, an open-source, GPU-accelerated ray tracer for gradient-index (GRIN) and anisotropic optical media, implemented entirely in PyTorch. GeoRay combines four capabilities that are rarely provided together in a single open-source tool: (i) a fully vectorized BVH-accelerated triangle-mesh intersector in a Structure-of-Arrays layout; (ii) a per-ray adaptive Runge--Kutta 4 integrator for arbitraryspatially-varying refractive index fields; (iii) full Stokes polarization tracking using Jones--Mueller matrices with reference-frame rotation; and (iv) a lightweight adapter for multi-body STEP CAD assemblies processed by the companion stepmesh library, preserving internal interfaces between contacting volumes. The package passes 11 unit tests across Python 3.9/3.10/3.11 through continuous integration. Physical correctness is verified against analytical Fresnel coefficients (relative error 7×10⁻⁸) and against exact energy-conservation checks at every propagation step. GeoRay is released under the MIT license and is intendedfor researchers in computational optics, photonics, and physics who require fast prototyping of GRIN-based optical elements and polarization-sensitive ray tracing.
No takes yet. Share an insight, caveat, or question.
Gang Wang (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: