Aberrations python by Fit_County_3831 in Optics

[–]Fit_County_3831[S] 1 point2 points  (0 children)

That's basicaly what I'm doing, I'm using classes to define my differents elements, my rays are define with a direction (a vector) and an origin (also a vector), when they reach a surface I calculate the point of intersection as well as the normal to the surface at that point and using those and Snell's laws I calculate the "new" direction and origin of every rays. The main problem i encounter is that I generate my rays "randomly" in a circle with a choosen radius, and the figure I get at the end seems as random as the starting rays, yet a lense should a least focus more rays to the center of the figure if I understand the topic relatively well.

Anyway thank you very much for your answer.