Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raytracing #13

Closed
brandondube opened this issue May 5, 2019 · 4 comments
Closed

Raytracing #13

brandondube opened this issue May 5, 2019 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@brandondube
Copy link
Owner

brandondube commented May 5, 2019

It is conceivable that one day we might want prysm to have a raytracing engine. Addition of such a feature will require considerable planning and discussion, followed by an extended period of hard work.

@brandondube brandondube added enhancement New feature or request help wanted Extra attention is needed labels May 5, 2019
@JakobSilbermann
Copy link

Hello,
i did some research on it and found some other projects on github on raytracing. Would it not make sense to somehow incorporate them in prysm. I found https://github.com/mjhoptics/ray-optics [Michael Hayford] very good.

@brandondube
Copy link
Owner Author

Raytracing is a nice-to-have for prysm. I can imagine, for example, modeling a system with misalignments via raytracing and then meshing the rays to make OPD and amplitude maps for the physical optics side.

Mike Hayford's module there is indeed very good.

Incorporating it or another into prysm is a bit tougher. What you might want raytracing in prysm for has a very different sense of the ray grids desired and outputs desired (for example, a spot diagram is totally uninteresting for what I'd want raytracing for).

Several of them, Mike's included, have a POPPY-esque concept of "set up a run, then run it." That style is quite incompatible to the modeling throughput prysm is designed for. As an example, at work, a forward model of a system I work with daily is often executed millions of times per day. I would not be surprised if I've passed a billion forward models over its lifetime. That sort of exascale modeling and "tape machine" type architectures are hard to combine (the meta-machinery for the latter is too much "unproductive" overhead).

@JakobSilbermann
Copy link

JakobSilbermann commented Mar 28, 2021

Ok, i get the point thank you for your feedback. So what i understand from your answer is a quick conversion from rays to wavefront or vice versa to do calculation with one or another. I as an example would use rays converted from a wavefront (sperical aberation) to simulate a ronchi pattern and then compare this to the pattern i see in the lab when i am quick testing lenses.

So in the simple model i have in mind on wavefronts an rays this would mean that i have to derivative the wavefront to get rays or integrate the other way round to get wavefronts from rays. This might sound a bit to easy and maybe i am wrong (please correct me then) but this is my first idea when i think of it.

@brandondube
Copy link
Owner Author

Spencer & Murty's algorithm was implemented in 566d6ed and f591c30

I still need to add all of the other polynomial surface types, and implement even aspheres and XY polynomials. But maybe for now I will not implement either since they are inferior to orthogonal polynomials.

A test suite is needed, and better graphing code (still sequestered in some dev notebooks).

Rotated surfaces may be implemented wrong(?). Tilting an image plane results in an off-axis raytrace, which is counter to my expectation.

Closing this issue now in favor of new issues to go under #60 for specific extensions to what is implemented now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants