Skip to content

Overlaying multiple lens configurations in a single drawing

Question

I am trying to draw multiple configurations superposed on the same lens drawing (without resetting the graphics window). I am using the cfg, drl and drr commands, but I can't seem to get the window to stop erasing between the drawing of the different configurations. How can I do this?

Synopsis

Overlaying multiple lens configurations in a single drawing

Solution

The keys to doing this is the OLSO Preferences settings that 1) turn off the graphics window autoclear, and 2) turn off the graphics window labels that would look different in each of the configurations. It is also important to make sure that each of the configuration drawings is drawn to the same scale. This is done using the "pre" parameter in the "drl" or "draw_lens" command. A complete CCL routine that allows you to do this is outlined below. To use the CCL routine:  
  1. Cut and paste the following CCL lines of code into the OSLO editor and save the file into your ...privateCCL directory with a name similar to graph_zoom1.ccl (the exact name of the file is unimportant as long as it is not the same as one that already exists).
  2. Then remember to compile your private CCL directory by typing "CCL" (no quotes) on the command line.
  3. To use the command, simply type "dro" (no quotes) on the command line.
//Draw lens configurations overlayed cmd dro(void) { int i, j; set_preference Graphics_autoclear off; set_preference Graphics_labels off; for (i = 1; i <= maxcfg; i++) { if (cfac[i]) { switch_configuration(i); draw_lens pre;draw_default_rays; } } set_preference Graphics_autoclear on; set_preference Graphics_labels on; } Multi-configuration systems are only available in OSLO Premium and OSLO Standard.