2D visualizsation doesn't show concave surfaces correctly
Describe the bug Vis.drawtracerays() and, I think, Vis.draw() do not properly render 2D images of concave surfaces
I also surprised the light goes from positive to negative and the system grows in the negative z direction. This is different than most optical design software. Is this working as intended?
To Reproduce
- Go to https://microsoft.github.io/OpticSim.jl/stable/examples/ and examine the Cooke Triplet. The 2nd surface of the 1st lens and both surfaces of the 2nd lens drawing has no curvature, but the description shows that they should be concave.
Viewing the lens in 3D suggests that the surfaces are concave as expected, but this does not show up in 2D drawings.
Expected behavior 2D plots of axisymmetric lenses normally show the profile in the yz plane, not a projection of a 3D object.
Screenshots This is visible in the stable documentation
I also surprised the light goes from positive to negative and the system grows in the negative z direction. This is different than most optical design software. Is this working as intended?
This was intentional, you can design systems to work in either (or any) direction - the examples and helper functions just use this convention, but you are free to work in 3D space
Vis.drawtracerays() and, I think, Vis.draw() do not properly render 2D images of concave surfaces
Yeah, originally this worked properly but the behavior has probably changed through various updates to Makie/the visualisation code. The drawing is "correct" ie the concave surface is there, it just isn't visible in the 2D viewpoint because you see the wider boundary surface of the lens behind it. In 3D it should appear correctly. Improving 2D visualisation is definitely something that would be worthwhile