brandondube / prysm

physical optics: integrated modeling, phase retrieval, segmented systems, polynomials and fitting, sequential raytracing...
https://prysm.readthedocs.io/en/stable/
MIT License
266 stars 46 forks source link

Raytracing #60

Open brandondube opened 3 years ago

brandondube commented 3 years ago

This is the catch-all bucket for things needed for prysm to do raytracing

zhangderby commented 1 year ago

Heya, I'd like to play around with prysm's raytracer for modeling a reflective system I'm working with. Do you have an example raytrace I could take a look at to help me get started?

brandondube commented 1 year ago

There are actually two secret tutorials hidden in the docs source,

https://github.com/brandondube/prysm/blob/master/docs/source/tutorials/Raytracing-Fundamentals.ipynb

https://github.com/brandondube/prysm/blob/master/docs/source/tutorials/Raytracing-OAP-Trains.ipynb

However I think neither actually runs at the moment, due to a breaking change in the plotting functions.

Unfortunately the raytracer is not very useful right now. It can give you the position and direction cosines of arbitrary rays sequentially traced through a system, but if you want to do most anything useful like make an OPD map, it does not have the logic to find EP/XP reference spheres, or do the equally inclined chords talked about in Hopkins' 50+ page monster of a raytracing paper.

If you wanted to add those I would merge the PR in a heartbeat ;)