**[»] Tutorials**and

**[»] Optics**.

In a [»] previous post I have shown a fully-corrected system called a **Perfect Dialyte** based on an aspheric lens and a meniscus lens. The system was corrected for spherical aberration, coma, astigmatism and Petzval provided some conditions are met on the various elements. One important condition was that each of the two elements used were aplanatic (corrected for spherical aberration and coma). At that moment, the only aplanatic lenses that were introduced were the [»] meniscus lens and the [»] aspheric lens.

In the very [»] last post, I then showed how a system of two lenses with little airgap (thin doublets) could be tuned such that they are aplanatic as well. We also saw that there exists up to 6 solutions for a given choice of two glasses and 2 solutions when only one glass is used. This means that we now have 12 different ways to make an aplanatic lens. They are shown in Figure 1. Note that there exists an infinity of aplanatic lens designs (*e.g.* the Perfect Dialyte is an aplanatic lens system on its own) and here we only focused on some specific solutions for thin systems made of up to two lenses. Also, there are four possible aspheric lenses out of two glasses choice since it’s possible to put the aspheric term on either the front or rear surface and we have two glasses to select from. Similarly, there are two meniscus lenses possible from the two glasses available.

We can therefore substitute any of the lenses of Figure 1 to our Perfect Dialyte design. Actually, not all of these lenses because some solutions are not possible. For instance, it is not possible to use a meniscus lens in front of the design for infinite-conjugate systems (see [»] here why). Also, if we try to use an aspheric lens as rear optics, it will decay into a meniscus lens with no asphericity due to the specific conditions met for that lens (see [»] here as well why). We are therefore left with the solutions of Figure 2.

And this is precisely where things become interesting! We have 10 solutions for the first lens and 8 solutions for the second lens, summing up to a total of 80 designs for a given choice of two glasses. Actually, only a fraction of these systems will be fully-corrected because of the conditions required to balance the Petzval (only systems composed of an aspheric and meniscus lens of the same glass or based on two doublet lenses of the same glasses will be corrected for Petzval). Similarly, we saw that cemented doublet may have residual spherical aberrations depending on the glasses choice. Nonetheless, all these systems will be pretty close to being fully corrected and should offer high image quality. And this is for a given set of two glasses knowing that the Schott catalog alone contains several hundreds of glasses to pick from!

At this point, we may ask what’s the point in having *that many* fully-corrected systems since they all have zero third order contributions. This is true, but you should remember that third-order aberrations are only a fraction of the total aberrations of a system (see [»] here why). Real systems’ performances will vary, and some will be better than others.

And this is precisely the point that I wanted to reach with this #DevOptical series as introduced in my [»] very first post back in 2021: **automation**. Starting from a skeleton of 1^{st} order design similar to the one of Figure 2, we can perform automated substitution based on some criteria (*e.g.* replace by aplanatic lenses) and generate pre-solutions that are analytically corrected as a starting point. From these pre-designs, a regular optimization can then performed which will quickly converge to a final system that can be evaluated according to the user criteria. All of that automatically! At the end, the user is presented with a few best solutions from which he can pick the one that seems the most suitable for the application.

Also, if systems creation can be automized, so can CAD or even cost or tolerance analysis. The computer algorithm that generates the pre-design can prune designs that are judged not-manufacturable or too costly (too much lenses, too much aspheric components, design too sensitive *etc.*).

Figure 3 shows some of these procedurally-generated systems with a star ranking based on how far they are from diffraction limit. These systems were generated in only a few minutes, CAD included, for a selection of two common glasses from the Schott catalog. I included systems that had high and low performances to be representative of the kind of solutions generated by the algorithm.

The results of Figure 3 can be extended by scanning the Schott catalog (or any other glass catalog). On the 356 glasses listed in this catalog, I kept 44 of them by filtering for standard glasses that have good environmental resistance an machinability, creating a set of 946 glass pair for which we have 80 possible dialyte designs using the solutions of Figure 2, leading to a total of 75,680 potential designs to be evaluated.

Since it is not desirable to systematically optimize all of these designs, this brings the question of how to sort those that are good candidates for a final design. As mentioned earlier, it is already possible to prune the solutions that are not physically feasible nor machinable, leaving here a total of 26,910 remaining pre-design systems.

Here, I ranked those pre-designs based on two criteria: (1) rms spot size performance on the whole field, and, (2) relative cost. RMS spot size performance was evaluated as the worst value between on-axis, off-axis and zonal rays as explained [»] here. Relative cost was evaluated using the glass listed relative cost, the estimated blank volume for each lens and by adding a penalty factor for cementation and aspherization processes. Each pre-design can therefore be evaluated along two parameters and there is not a single optimal design but a group of them based on the concept of **domination**. A system is said to be dominated if there is any other system in the list that has better rms spot size performance __and__ better cost at the same time. We can therefore focus our attention on pre-designs that dominate all others. Note that since this is a bit restrictive and we might leave good solutions on the side, I expanded here the selection to designs that have less than a given number of dominators (10 here, but this is an arbitrary choice).

The results are summarized in Figure 4. Of the 75,680 total systems, 26,910 were evaluated leaving 170 solutions to focus our attention on. Each evaluated system took on average 38 ms on a regular desktop computer and using only 7 Mb of RAM, making the search very scalable to cloud-based architectures.

We see two different types of extreme behavior in Figure 4: systems with very high performances but with high relative costs, and, systems with very low relative costs but with much poorer performances. From there, multiple things can be done:

(1) Each of these pre-designs can be optimized as a whole. Up to now, only the individual elements were optimized separately for aplanatic and achromatic conditions and it is possible that small tuning to the lenses bending and power partition ratios of doublets can lead to improved overall performances of the system due to higher order aberrations.

(2) Each of these pre-designs can be further extended by splitting lenses into multiple elements. Splitting elements can reduce higher-order aberrations and yield even better performances. Although this can be done on any of the systems of Figure 4, including dominated solutions, it makes sense to restrict this process to systems that already have excellent performances to avoid generating too much candidates at the end since it is unlikely that a very poor system will suddenly performs very well by applying a minor change to it.

(3) For each of the pre-designs that are already diffraction-limited or close to diffraction-limit, it is possible to either expand the f-number of the systems or the maximum field angle. We could imagine that, for each of the diffraction-limited pre-design, we could generate children candidates solutions with 10% larger aperture or 10% larger maximum field angle. Each of these candidates would then be processed again and refined using any of the strategies described here, eventually converging to the best achievable performance for that given system and glasses choice.

(4) Each of these pre-designs can also be investigated further in terms of machinability, tolerance analysis, thermal behavior etc. These aspects will be covered later but are an important part of optical design as well.

In conclusion to this post, we saw that starting from a first order design of a system and some substitution rules (the rule here was that the lenses to be substituted must be aplanatic), it was possible to generate a list of 170 candidates pre-design systems that can now be refined or even expanded to yield complete optical design solutions including optomechanical CAD and manufacturing analysis. We also saw that the overall process is fast and very scalable, making it an excellent candidate to cloud-based architecture.

We could therefore imagine a world where the role of the optical designer would be radically different. He would have to specify the first-order aspect of his system with some rules to guide an automated optimization process. A cloud-based processing would then, in a matter of minutes or even seconds, generate complete solutions that would include lenses drawing and mechanical housing drawings, tolerance and cost analysis of the system. This would completely redefine the role of the optical design and decrease by orders of magnitude the cost and time related to optical design.

If, like me, you are extremely enthusiastic about the possibilities offered by procedural generation of optical design, I encourage you to donate by subscribing to my [∞] Patreon list. I am now working full-time on the website, the #DevOptical series and open-hardware development so I need your help to make this adventure continue as long as possible! At this occasion, I would like to already thanks all of the Patreons who have been following me over the past few years and who encouraged me to pursue this fantastic journey.

A big thanks therefore to **Young**, **Naif**, **Samuel**, **Sebastian**, **James**, **Lilith**, **Alex**, **Stephen**, **Jesse**, **Jon**, **Sivaraman**, **Cory**, **Karel**, **Themulticaster**, **Tayyab**, **Marcel**, **Kirk** and **Dennis**!

**You may also like:**

[»] #DevOptical Part 26: Thin Doublets

[»] #DevOptical Part 25: The Perfect Dialyte

[»] #DevOptical Part 15: Paraxial System Tolerance Analysis