... | @@ -108,6 +108,7 @@ pyrateoptics.listOptimizableVariables(opticalsystem, max_line_width=75) |
... | @@ -108,6 +108,7 @@ pyrateoptics.listOptimizableVariables(opticalsystem, max_line_width=75) |
|
pyrateoptics.draw(opticalsystem, rays)
|
|
pyrateoptics.draw(opticalsystem, rays)
|
|
# This function can get a list of raypath argument to draw rays.
|
|
# This function can get a list of raypath argument to draw rays.
|
|
```
|
|
```
|
|
|
|
# Some Impressions
|
|
|
|
|
|

|
|

|
|

|
|

|
... | @@ -144,7 +145,50 @@ Grin material with coordinate system tilted against global coordinate system. |
... | @@ -144,7 +145,50 @@ Grin material with coordinate system tilted against global coordinate system. |
|
Water droplet which bends the light of different wavelengths differently in order to create a rainbow.
|
|
Water droplet which bends the light of different wavelengths differently in order to create a rainbow.
|
|
The material data was obtained from https://refractiveindex.info by Mikhail N. Polyanskiy.
|
|
The material data was obtained from https://refractiveindex.info by Mikhail N. Polyanskiy.
|
|
|
|
|
|
## Formulas
|
|
# Frequently Asked Questions
|
|
|
|
|
|
|
|
## I know of another raytracer project, why not combining forces?
|
|
|
|
|
|
|
|
Our goal is to provide a very general raytracer with arbitrary coordinate systems and nearly arbitrary materials and we want to see how far we could go this route.
|
|
|
|
|
|
|
|
This implies also some conceptual problems on the road which are difficult to solve and therefore our development is far slower than it could be.
|
|
|
|
|
|
|
|
This also implies that we cannot properly throw together code with projects where the goal is "to just get this
|
|
|
|
raytracer done and useable". At the end of the day our raytracer should also be useful, but maybe our goal is not compatible with other raytracer projects.
|
|
|
|
|
|
|
|
Nevertheless: we are always interested in contributions, questions, issues and if somebody implemented cool stuff or is interested in our stuff, we are happy to provide interfaces or code.
|
|
|
|
|
|
|
|
https://github.com/mess42/pyrate/issues/142
|
|
|
|
|
|
|
|
## What about the FreeCAD interface?
|
|
|
|
|
|
|
|
The FreeCAD interface has more or less the status of a mockup and is broken since the last large refactoring in 2017. Until now there is no good idea about getting a not-so-tight coupling between FreeCAD classes and pyrate classes. Since the API is not quite settled it is really difficult to start with a full fledged FreeCAD interface without rewriting all the stuff when there is a slight API change appearing. All ideas here are appreciated. If you are interested in digging into the matter, please have a look in the `freecad/PyrateWorkbench` directory.
|
|
|
|
|
|
|
|
https://github.com/mess42/pyrate/issues/136
|
|
|
|
https://github.com/mess42/pyrate/issues/134
|
|
|
|
https://github.com/mess42/pyrate/issues/91
|
|
|
|
|
|
|
|
## How does the optimizer work?
|
|
|
|
|
|
|
|
The optimizer decomposes in backend and frontend whereas the backend determines which optimization algorithm is used and the frontend determines which meritfunction or parameters to be used.
|
|
|
|
|
|
|
|
There were several discussions on that in the following issues:
|
|
|
|
|
|
|
|
https://github.com/mess42/pyrate/issues/140
|
|
|
|
https://github.com/mess42/pyrate/issues/137
|
|
|
|
|
|
|
|
## How to create a full sphere lens?
|
|
|
|
|
|
|
|
Since the `Conic` surface solves the ray intersection equation analytically and the two intersection points in a sphere correspond to the two roots of the quadratic equation, one cannot properly use two subsequent `Conic`s and expect a proper raytracing. In issue XX and our own research, we came up with a few workarounds:
|
|
|
|
|
|
|
|
* use a slightly deformed second surface (introduce radius deviation or slight conic const) -> this is no optimal solution when you need an exact sphere
|
|
|
|
* use the `Asphere` type surface to avoid the quadratic analytical solution problem and use a numerical solver instead
|
|
|
|
* use an intermediate plano surface (this is the most reliable solution without any downsides)
|
|
|
|
|
|
|
|
https://github.com/mess42/pyrate/issues/149
|
|
|
|
https://github.com/mess42/pyrate/issues/50
|
|
|
|
|
|
|
|
# Formulas
|
|
|
|
|
|
If you want to use formulas in issues or wikis, then the following example would be useful:
|
|
If you want to use formulas in issues or wikis, then the following example would be useful:
|
|
|
|
|
... | | ... | |