I'm trying to run a (seemingly) simple simulation of a basic microscope using the free software WinLens 3D Basic, but the ray tracing looks wrong:


The microscope consists of a small plano-convex lens with 2 mm focal length and a larger achromatic doublet with 200 mm focal length, crudely representing an infinity-corrected 100X plan-apochromatic objective and a matched tube lens of a commercial system, respectively. The goal is to see the effect of extremely long tube lengths on the field of view (FOV) and, later, possibly also on chromatic aberrations.

Both lenses are placed in a confocal/"2f" configuration (their distance being the sum of their focal lengths) and the object distance has been adjusted until the image distance reached 200 mm (which equates to focusing onto the sample by adjusting the object distance until you get a sharp image). The object size radius was chosen to be 0.125 mm (0.250 mm diameter), corresponding to the 0.250 mm x 100X magn. = 25 mm FOV of the actual microscope system. The two ray bundles originate from one object point on the optical axis and one on the very edge of the FOV:


PROBLEM: The rays going from the tube lens to the sensor appear to be all parallel, whereas one would expect them to converge to form a real image:

Tube lens to sensor

What is going on here? All the parameters such as object and image distances, magnification etc. appear to be correct.

PS.: As a side note, the rays going from the objective to the tube lens appear to converge, i.e. there seems to be a "beam waist". I assume this is simply the spherical aberration? To reduce it, I tried to implement an asphere from Thorlabs using the aspheric coefficients, base sphere radius, correct glass type etc. from the datasheet (even included the small N-BK7 window of the laser diode), but the results were way worse:

Thorlabs asphere with laser window

Removing the laser window improved off-axis performance, but it stills seems to fall short of the simple plano-convex lens (see difference in diameter of central and peripheral ray bundle) and I'm not sure why, since the curvature/base sphere radius of the plano-convex vs. aspheric lens aren't that different (1.7 mm vs. 1.59 mm):

Thorlabs asphere without laser window

...in any case, this cannot explain the weird parallel rays between the tube lens and sensor plane!

This appears to be a rather basic issue. But I simply cannot find a configuration where the object points get properly focused to image points. Like so:

Test with two identical lenses


2 Answers 2



As suspected, this seems to be a user error: WinLens computes focal/object/image/... planes and distances using the paraxial (small-angle) approximation (my assumption, haven't confirmed this with the program's author yet). By default, the program does not draw paraxial ray traces, but only "full ray fans", i.e. exact ray traces according to the law of refraction, which is also what optics designers are interested in.

In order to see the idealized convergence of image space rays on the tube lens' focal plane, one has to enable the drawing of paraxial rays (and also consider disabling "full ray fans" for better visibility):

Enable drawing of paraxial rays

One can clearly see that paraxial rays are approximated to refract from virtual planar surfaces (principle planes) instead of the actual lens surfaces:

enter image description here

  • $\begingroup$ Please consider joining the chemistry stack exchange! It gives access to chemistry meta, which has Sandbox 3. That is available for temporary posting of content and it is where I linked you to when I was writing up my polarizers answer that appears to have mightily transgressed. Anyway, you can post there, temporarily, if you need to, and images, screenshots, etc., are fine. The main thing is to not leave stuff posted there for more than 2-3 days. I will probably not post here anymore, except for linking to maybe helpful stuff at Sandbox 3 or elsewhere. Best of success! $\endgroup$
    – Ed V
    Sep 6, 2023 at 1:12
  • $\begingroup$ @EdV Okay, will do! But it seems something is going wrong here if users have to shift their activities entirely to a temporary posting platform... $\endgroup$
    – srhslvmn
    Sep 6, 2023 at 1:57
  • $\begingroup$ Well, they don’t have to shift, so long as they follow strict rules that are not always equitably enforced. The situation with MathJax is also problematic, since different versions are used in the technical stack exchanges, e.g., physics, chemistry, electrical engineering. They could at least try to have one master version. Anyway, the Sandbox is just an option that happens to not be encumbered by needless rules and it makes a nice way to vector files, etc., to others. $\endgroup$
    – Ed V
    Sep 6, 2023 at 2:14

You should compute the Fresnel number of the system. It is a dimensionless number used in optics and wave theory to describe the behavior of wave diffraction. The Fresnel number is defined as: $$F = a^2 /(\lambda L),$$ where $a$ is the characteristic dimension of the aperture (often the radius for circular apertures), $\lambda$ is the wavelength of the light, and $L$ is the distance from the aperture to the observation or screen plane.

The Fresnel number is essential in applications like lens design, imaging systems, and many other optical phenomena where understanding the wave nature of light is crucial.

For $F\ll 1$, then the wave nature of the probation of light dominates over geometric optics ray trace. I suspect you're in a regime where this is what's happening, and hence there is a limit to where you can place the image. For $F\gg 1$, geometric optics works fine.

  • $\begingroup$ Comments have been moved to chat; please do not continue the discussion here. Before posting a comment below this one, please review the purposes of comments. Comments that do not request clarification or suggest improvements usually belong as an answer, on Physics Meta, or in Physics Chat. Comments continuing discussion may be removed. $\endgroup$
    – Buzz
    Sep 5, 2023 at 0:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.