This file is indexed.

/usr/share/doc/opticalraytracer/HelpText.html is in opticalraytracer 3.2-1.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>
      * OpticalRayTracer
    </title>
    <style type="text/css">
td {
  border-width:1px;
  border-style:solid;
  border-color:black;
  border-collapse:collapse;
  /* white-space:nowrap; */
}
.article_subtopic {
  font-weight:bold;
}
    </style>
  </head>
  <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">
    
    <div align="center">
      <p><h2><img src="../icons/OpticalRayTracer.png" width="32" height="32" title="" alt=""/>&nbsp;OpticalRayTracer #version# Help Page</h2></p>
      
      
      <p><i>A virtual lens design workshop.</i></p>
      <p>Copyright &copy; 2011, <a href="http://arachnoid.com/administration/index.html" title="Click for biography">Paul Lutus</a> &mdash; <a href="http://arachnoid.com/messages/index.php">Message Page</a></p>
      
      <p>OpticalRayTracer is released under the GPL: <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a></p>
      
      <p>Visit the <a href="http://arachnoid.com/OpticalRayTracer">OpticalRayTracer Home Page</a> for more information and to be sure you have the latest version.</p>
      
      
      <p><b>NOTE:</b><i> For formatting reasons, users may want to temporarily make the OpticalRayTracer program frame larger to properly read these instructions.</i></p>
      
      <p><b>NOTE:</b><i> Users may prefer to search this document using the search feature at the bottom of this frame.</i></p>
      
      <p><!-- LINK_MENU_START -->
<a href="#Introduction">Introduction</a> | <a href="#First_Steps">First Steps</a> | <a href="#The_Basics_of_Lenses">The Basics of Lenses</a><br/>
<a href="#Supported_Lens_Types">Supported Lens Types</a> | <a href="#Tutorial">Tutorial</a> | <a href="#Lens_Control_Panel">Lens Control Panel</a><br/>
<a href="#Dispersion_Experiment">Dispersion Experiment</a> | <a href="#Using_the_Mouse_and_Keyboard">Using the Mouse and Keyboard</a> | <a href="#Importing_and_Exporting_Data">Importing and Exporting Data</a><br/>
<a href="#System_Considerations">System Considerations</a> | <a href="#Algorithm_Description">Algorithm Description</a> | <a href="#Snell_s_Law">Snell's Law</a><br/>
<a href="#Dispersion_Computation">Dispersion Computation</a> | <a href="#Configuration">Configuration</a> | <a href="#Conclusion">Conclusion</a><br/>
<a href="#User_support">User support</a>
<!-- LINK_MENU_END --></p>
      
      
      
      
    </div>
    <p></p>
    
    <a name="Introduction"></a><div class="article_subtopic">Introduction</div>
    
    
    
    
    <blockquote>
      <p>OpticalRayTracer is a very portable Java program meant to analyze and model systems of lenses. It accurately models the physics of lenses, including the effect known as dispersion. But perhaps the most remarkable thing about OpticalRayTracer is that it updates and displays complex ray tracing paths in real time, as the user moves virtual lenses around on a virtual optical bench. This allows the user to very quickly learn the behavior of a system of lenses, compare, experiment, and just play.</p>
      
      <p>OpticalRayTracer places its configuration file in a directory it creates, so your settings and choices are preserved. This directory is located at #userdir# on your machine, and it contains a configuration file named "OpticalRayTracer.ini" containing quite a lot of detailed information unique to your use of the program.</p>
      
      
      
      <p>I mention this because:</p>
      
       <ul>
  <li>if you want to analyze or process the results of your work with OpticalRayTracer, the file #userdir#/OpticalRayTracer.ini contains a lot of numeric information in plain-text form, and</li>
          <li>if you have gotten into difficulty and just want to start over, simply delete this file and run OpticalRayTracer again.</li>
        </ul>
      
      
      
      <p>This file contains a very detailed snapshot of your last session with OpticalRayTracer, with lens specifications and positions, suitable for exporting into other environments (the same information can be gotten from the <img src="../icons/edit-copy.png" width="22" height="22" style="vertical-align:middle;" title="" alt=""/> copy-configuration button on the Design toolbar). To create this file and its picture of your optical setup, simply exit OpticalRayTracer, navigate to #userdir# and read the file.</p>
      
      
    </blockquote>
    
    <a name="First_Steps"></a><div class="article_subtopic">First Steps</div>
    
    <blockquote>
      
      <p>Since you are reading this, you have successfully installed OpticalRayTracer, and are ready to try some experiments.</p>
      
      <p>When it is first run, the program will automatically create two common lenses for you, a double-convex lens and a double-concave lens. Click the <img src="../icons/applications-graphics.png" width="22" height="22" style="vertical-align:middle;" title="" alt=""/> "Design" tab and you will most likely see these two default lenses. If you do not see any lenses, click the <img src="../icons/process-stop.png" width="22" height="22" style="vertical-align:middle;" title="" alt=""/> "Erase &amp; Reset" button.</p>
      
      <p>Navigation within the ray trace display is as intuitive as I could make it:</p>
      
      <ul>
        <li>To zoom in and out, use your mouse wheel.</li>
        
        <li>To pan around the display, just click the display and drag using the mouse.</li>
        
        <li>To move a lens from one place to another in the display, simply click the lens and drag it.</li>
      </ul>
      
      <p>Notice that panning the display itself requires you to click outside any lenses, then drag. To move a lens, click directly on the lens you want to move and drag it.</p>
      
      <ul>
  <li>The display has two dimensions, "x" and "y". "x" is the horizontal dimension, and positive values for x move to the right. "y" is the vertical dimension, and positive values for y move up.</li>
        
        <li>To move large distances, first zoom out, then pan, then zoom in again. This saves time compared to clicking and dragging multiple times.</li>
        
        <li>To determine the position of something in the display, for example the location of a focal point, simply point the mouse cursor at the point of interest and read the mouse x and y position on the status bar.</li>
      </ul>
      
      <p>The default setup shows six light beams passing from right to left, through the lenses. The mathematical methods used in this program are efficient enough that (with a moderately fast computer) you can move the lenses around and see how this changes the beam paths — in real time. Try it — move the lenses around (click on a lens and drag it) and observe the changing beam paths.</p>
      
      <p>Notice that, when you click a lens, a selection frame appears and the blue control panel below the display becomes enabled. This panel allows you to change the characteristics of your lenses — focal length, size, curvature, and many other things. Feel free to experiment with this panel's settings — see how they change the appearance of the lenses and the beams.</p>
      
      <ul>
  <li>If you make a change you don't like, simply press the <img src="../icons/edit-undo.png" width="22" height="22" style="vertical-align:middle;" title="" alt=""/> "Undo" button to change back.</li>
        
        <li>To change the settings for a lens, first click the lens, then use the lens control panel to make the changes you want.</li>
      </ul>
      
      <p>It will help to know a little about optics to understand what you are seeing. If you already know the basics, you can safely skip the next few lines.</p>
      
    </blockquote>
    <a name="The_Basics_of_Lenses"></a><div class="article_subtopic">The Basics of Lenses</div>
    
    <blockquote>
      
      <p>Very basically, a lens is a simple way to bend light beams. Imagine a row of soldiers marching, side by side. To change the direction they are marching, it is necessary to make some of the soldiers slow down temporarily. Now let this picture of marching soldiers help you imagine a light wave, traveling through space. Just as with the soldiers, to make the wave change direction, you have to think of a way to make part of the wave slow down. That is what a lens does — it selectively slows parts of a light wave.</p>
      
      <p>A convex lens is thicker in the middle than at the edges, and, as it turns out, light takes longer to pass through glass than through air. What this means is that the light that passes through the middle, thickest part of the lens, is slowed down compared to the light that passes through the thinner parts near the edges of the lens. This has the effect of shaping the wavefront that emerges from the lens — the middle of the emerging wavefront is delayed, and the wave's overall shape is concave, with a depression in the middle. The wavefront has been shaped to converge on a point some distance away from the lens, and that is exactly what it does.</p>
      
      <p>Such a lens could be used to focus parts of a real-world scene onto a piece of film or an image sensor. The ability of a lens to focus accurately is a central issue in lens design and, as it turns out, the most common kind of lens, with a spherical shape, is actually quite a bad lens. Its only advantage is that it is easy to make — everything after that is downhill.</p>
      
      
    </blockquote>
    
    <a name="Supported_Lens_Types"></a><div class="article_subtopic">Supported Lens Types</div>
    
    <blockquote>
      
      
      <p>OpticalRayTracer will happily let you play with various kinds of simple, spherical lenses in its virtual playground, but it also includes some mathematical methods that allow you to fashion some rather extraordinarily good lenses called "hyperboloids," famous for their accuracy ... and their difficulty of manufacture. These kinds of lenses are so expensive that it is simpler — and much less expensive — to build and test such lenses using a program like OpticalRayTracer than to try to purchase real-world examples. This is an answer to the oft-heard objection to too much gazing at glowing computer screens. We are excused, just this once, by pointing out that building an exotic lens on a computer screen, changing its characteristics, experimenting, would cost thousands of dollars if rendered in glass instead of computer code, and would require months of fabrication time as well.</p>
      
      
    </blockquote>
    
    <a name="Tutorial"></a><div class="article_subtopic">Tutorial</div>
    
    <blockquote>
      
      <p>I want you to perform your own experiments, but here's a simple tutorial to get you started. Using the default lenses automatically created when you run OpticalRayTracer the first time, temporarily drag the concave lens (the lens at the right) out of the optical path. If you drag it a small distance, it will jump back into place, realigning itself with the beam line (ordinarily this automatic feature is a good thing). So drag it a good distance up or down, temporarily removing it from the beam path. Now notice the double-convex lens at the left. If you click this lens and then read its characteristics in the control panel below it, you will discover that it has a "lens radius" of 2 units and a "sphere radius" of 6 units. What do these terms mean?</p>
      
      <ul>
        <li>"Lens Radius" refers to the distance from the center to the edge of the lens itself. Very simple.</li>
        
        <li>"Sphere radius" refers to imaginary spheres that our lens is composed of. Imagine two spheres of glass floating in space, overlapping to some extent, and then imagine that our lens represents the parts of the spheres that overlap. To help in visualizing this, draw two circles on a piece of paper using a coin and a pencil, and be sure to allow some overlap between the circles. The area where the circles overlap is our lens. Starting with this paper diagram, one need only use imagination to expand the picture to three dimensions and glass.</li>
      </ul>
      
      <p>As it turns out, the mathematics behind lenses relies very much on this idea of overlapping spheres, hyperboloids, and some other useful shapes. So if you can mentally picture two overlapping spheres, you will be able to predict what will result from your typing particular numbers into OpticalRayTracer. For example, to create a lens with one side convex and one side flat, you might choose to enter a very, very large radius for one side. Like this:</p>
      
      <ul>
        <li>Select the double-convex lens by clicking it.</li>
        
        <li>Deselect the "symmetrical" check box, which will allow you to choose different traits for the left and right-hand sides of your lens.</li>
        
        <li>Enter "1000" into the "Left Sphere Radius" window and press Enter.</li>
        
        <li>You will see that the right-hand side of the lens has become flat, and (because we now have a lens with less overall curvature), the beams travel farther to the right before converging. The lens is said to have a longer focal length.</li>
      </ul>
      
      <p>At this point, you may wonder why an entry defining the left-hand sphere had its effect on the right hand side of our lens. The answer is that the imaginary spheres are overlapping, and the <i>right-hand</i> part of our lens is defined by an imaginary sphere centered to the <i>left</i> of the lens. I mention this now to avoid confusion later on. The circle that defines the right-hand side of the overlapped region (e.g. the lens) is centered to the left of the overlap area.</p>
      
      <p>Now for something a tiny bit more advanced.</p>
      
      <ul>
        <li>Select the default convex lens by clicking on it.</li>
        
        <li>Re-enter "6" for "Left Sphere Radius," press Enter, then enable "symmetrical" again by clicking its checkbox, restoring our lens to its original state — a simple, symmetrical double-convex lens.</li>
        
        <li>Drag the mouse on the display to pan over to the region between x = 5 and 6 (remember that "x" means the horizontal axis), where the beams should now be converging. Once you have centered this part of the display, use the mouse wheel to zoom in a bit for a closer look.</li>
        
        <li>While looking as the point where the beams converge, click the "Left Hyperboloid" checkbox (because you selected "symmetrical" above, this entry will affect both sides of our lens). The lens focus should improve.</li>
        
        <li>A quick reality check — what constitutes an "improvement" in a lens? Well, ideally, all the beams should converge on a single point, rather than taking slightly different paths as they are doing now.</li>
        
        <li>Now we are going to fine-tune our lens by entering a value for hyperboloid curvature. Type ".074" into the "Left Curv. Fact." window, and press Enter. If you have entered all the right values up to now, this should produce a nearly perfect focus — all the beams should converge on a single point, located at about x = 4.996.</li>
      </ul>
      
      <p>To discover how accurate this focus is, simply center the focal point in the display and zoom in on it. Eventually you will get to a point where you can see some small imperfections in the focus. (This will become visible at a zoom factor of about 15.) In any case, this class of lens design is very advanced and (no surprise) very difficult to manufacture.</p>
      
    </blockquote>
    
    <a name="Lens_Control_Panel"></a><div class="article_subtopic">Lens Control Panel</div>
    
    <blockquote>
      
      <p>Play with some of the settings in the lens control panel (the blue panel below the graphic display) to see what effect they have. Notice that you can reposition a lens exactly by entering its x and y coordinates — this is a way to get around the fact that it is difficult to position a lens precisely using the mouse.</p>
      
      <p>Notice the window marked "IOR". This means "Index of Refraction," a value representing the ratio of the speed of light through the lens in question to a vacuum (with an IOR of 1.0). If you set this value to 1.0, the lens will no longer deflect the light beams, because it has in essence been defined as empty space.</p>
      
      <p>Different glasses have different indices of refraction, a property that is taken advantage of in advanced lens designs. Here's an example design that exploits this fact, and introduces the topic of dispersion.</p>
      
      <p>"Dispersion" is a property of glass in which light beams of different wavelengths travel at different speeds. For example, a blue beam takes longer to move through a lens than a red beam. This causes the two colors (wavelengths) of light to focus at two different places, a trait regarded as a bad thing, called "chromatic aberration."</p>
      
    </blockquote>
    
    <a name="Dispersion_Experiment"></a><div class="article_subtopic">Dispersion Experiment</div>
    
    <blockquote>
      
      <p>To set up for this experiment, delete any existing lenses, then create a lens with these settings (or you can copy the lens definition from this page — see below):</p>
      
      <ul>
        <li>Symmetrical: selected.</li>
        <li>Lens Radius: 2.0</li>
        <li>Left Sphere Radius: 4.0</li>
        <li>Right Sphere Radius: 4.0</li>
        <li>Lens Thickness: 0.0</li>
        <li>Index of Refraction: 1.52</li>
        <li>Dispersion: 59</li>
        <li>X position: 0.0</li>
        <li>Y position: 0.0</li>
      </ul>
      
      <p><a href="file:'0.0|0.0|2.0|4.0|4.0|0.0|1.52|0.03|0.03|59.0|false|false|true'">Click here</a> to copy this lens definition onto the clipboard, then paste it into the experimental setup using the display context menu (use "Paste: defined position").</p>
      
      <p>Now switch to the "Configuration" panel and enter 2 for "Beam Count". Now return to the ray trace display to see the effect.</p>
      
      <p>If all your settings are correct, and if the lens has really been positioned at x = 0, y = 0, the two beams should converge at about x = 2.53.</p>
      
      <p>Now we'll add a dispersion calculation. Go to the "Configuration" panel and enter 8 for "Dispersion beam count." When you return to the ray trace display, you should see an array of colored beams near the lens focal point. In this mode, OpticalRayTracer creates colored beams, each of which has an associated wavelength. During the calculation of the ray paths, the lens dispersion property is taken into account and, just as in the real world, the lens cannot focus all these wavelengths onto a single point.</p>
      
      <p>Moving right along, create a second lens (or copy it from this page — see below) with these properties:</p>
      
      <ul>
        <li>Symmetrical: deselected.</li>
        <li>Lens Radius: 2.0</li>
        <li>Left Sphere Radius: 1000</li>
        <li>Right Sphere radius: -4</li>
        <li>Lens Thickness: 0.1</li>
        <li>Index of Refraction: 1.72</li>
        <li>Dispersion: 29</li>
        <li>X position: 0.3834</li>
        <li>Y position: 0.0</li>
      </ul>
      
      <p><a href="file:'0.3834|0.0|2.0|1000.0|-4.0|0.1|1.72|1.0E-8|1.0E-8|29.0|false|false|false'">Click here</a> to copy this lens definition onto the clipboard, then paste it into the experimental setup using the display context menu (use "Paste: defined position").</p>
      
      <p>If all the settings on both lenses are correct and all the other required settings have been made correctly, you will see all the colored beams converge at about x = 11.63, with very little color dispersion.</p>
      
      <p>This, by the way, is a classic solution to the problem of chromatic aberration, using varieties of glass called "crown" and "flint," with differing properties that are exploited to make the light beams converge.</p>
      
      <p>By changing the spacing between the two lenses, you will quickly see that this setting is very critical to the outcome, which is why in the real world, such pairs of lenses are often glued together or placed in a lens cell with a spacer of some durable material to maintain a particular separation.</p>
      
    </blockquote>
    
    <a name="Using_the_Mouse_and_Keyboard"></a><div class="article_subtopic">Using the Mouse and Keyboard</div>
    
    <blockquote>
      
      <p>While playing with lens configurations, you may sometimes notice it is difficult to select a particular lens, because the lenses are very close together and their colored border-boxes overlap. In a case like this, just click again — the program will cycle through the lenses that could be selected at the location of your click.</p>
      
      <p>Virtually all OpticalRayTracer's text entry fields can be changed by placing the mouse cursor over them and spinning the mouse wheel. If the rate of change is too fast, hold down the shift key while spinning the mouse. If that rate is also too fast, hold down the shift and Alt keys together while spinning the mouse.</p>


      
      <p>
        These actions can be gotten with some special keyboard keys also — the up and down arrow keys will change the value by +1 and -1 respectively, with smaller changes if the shift and/or Alt keys are held down, just as with the mouse wheel example above. Here is a full list of these special controls:
      </p>
      
      <blockquote>
        <table cellspacing="-1" cellpadding="4" class="bordered" style="background:#fbfceb;">
          
          <tr style="background:#b2e0b4;">
            <td>
              <div align="center"><b>Action</b></div>
            </td>
            <td>
              <div align="center"><b>Result</b></div>
            </td>
          </tr>
          
          <tr>
            <td>
              Mouse wheel
            </td>
            <td>
              Value increased/decreased by 1
            </td>
          </tr>
          
          <tr>
            <td>
              up/down arrow keys
            </td>
            <td>
              Value increased/decreased by 1
            </td>
          </tr>
          
          <tr>
            <td>
              Page Up/Page Down keys
            </td>
            
            <td>
              Value increased/decreased by 10
            </td>
          </tr>
          <tr>
            <td>
              Home/End keys
            </td>
            <td>
              Value increased/decreased by 100
            </td>
            
          </tr>
        </table>
        
      </blockquote>
      
      <p>The following actions apply to the graphic display panels:</p>
      
      <blockquote>
        <table cellspacing="-1" cellpadding="4" class="bordered" style="background:#fbfceb;">
          <tr style="background:#b2e0b4;">
            <td>
              
              <div align="center"><b>Action</b></div>
            </td>
            <td>
              <div align="center"><b>Result</b></div>
            </td>
          </tr>
          <tr>
            <td>
              
              Mouse wheel
            </td>
            <td>
              Zoom in/out
            </td>
          </tr>
          <tr>
            <td>
              Mouse drag
            </td>
            
            <td>
              Pan image vertically or horizontally
            </td>
          </tr>
        </table>
      </blockquote>
      
      <p>Most of the above mouse and keyboard actions can be changed with the following modifier keystrokes:
</p>

<blockquote>
        <table cellspacing="-1" cellpadding="4" class="bordered" style="background:#fbfceb;">
          <tr style="background:#b2e0b4;">
            <td>
              
              <div align="center"><b>Action</b></div>
            </td>
            <td>
              <div align="center"><b>Result</b></div>
            </td>
          </tr>
          <tr>
            <td>
              Above actions accompanied by Shift key
            </td>
            <td>
              Amount of change divided by 10
            </td>
          </tr>

<tr>
            <td>
              Above actions accompanied by Alt key
            </td>
            <td>
              Amount of change divided by 100
            </td>
          </tr>          
          <tr>
            <td>
              Above actions accompanied by both Shift and Alt keys
            </td>
            <td>
              Amount of change divided by 1000
            </td>
          </tr>
        </table>
        
      </blockquote>      
      
      
      
    </blockquote>
    
    
    
    <a name="Importing_and_Exporting_Data"></a><div class="article_subtopic">Importing and Exporting Data</div>
    
    
    <blockquote>
    
    <p>OpticalRayTracer has a number of methods for writing and reading data to/from the world at large, primarily by way of the system clipboard.</p>
    
    <ul>
  <li>To create a copy of a lens you have designed, simply click the lens, press the right mouse button and choose <img src="../icons/edit-copy.png" width="22" height="22" style="vertical-align:middle;" title="" alt=""/> "Copy".</li>
      
      <li>To paste that lens somewhere else, move the mouse cursor to the desired destination point, press the right mouse button and select <img src="../icons/edit-paste.png" width="22" height="22" style="vertical-align:middle;" title="" alt=""/> "Paste: mouse cursor."</li>
  
  <li>You can save lens descriptions in other locations, or even paste them into an e-mail for a friend, by simply pasting the lens description from the system clipboard. This works because an OpticalRayTracer lens description is a plain-text line of ordinary characters like this:
  
  <blockquote>
0.0|0.0|2.0|6.0|6.0|0.0|1.52|0.03|0.03|59.0|false|false|true
</blockquote>
  </li>
</ul>

<p>You can also make a copy of the entire experimental setup — lenses, colors, zoom levels, everything — by clicking the "Copy" button on the toolbar below the graphic display (not the context-menu copy button). This places a full description of OpticalRayTracer's present state onto the system clipboard. And this exact state can be re&euml;stablished by pasting such a description using the toolbar "Paste" button. This means you can send a full, exact description of your experimental setup to a friend, including lenses, zoom settings, everything. Or you can save your experiments for later use by pasting them into a plain-text file.</p>

To make a graphic copy of the workspace display, click the <img src="../icons/applications-multimedia.png" width="22" height="22" style="vertical-align:middle;" title="" alt=""/> "Copy Workspace" button, then open a graphic image editor and choose "Paste".

      
    </blockquote>
    
    <a name="System_Considerations"></a><div class="article_subtopic">System Considerations</div>
    
    <blockquote>
    
    <p>If the behavior of your copy of OpticalRayTracer doesn't correspond in every way to the description provided here, it probably means your installed version of Java is not up-to-date. To remedy this, visit <a href="http://java.com">http://java.com</a> to update your Java installation (Java is free).</p>
    
      <p>Remember that the total number of beams traced is equal to the number of tracing beams (selected in the "Configuration" panel) multiplied by the number of dispersion beams, e. g. there is a dispersion beam for each chosen wavelength, times each tracing beam. So if the display slows down, this could easily be the reason — too many beams selected. To prevent calculation of dispersion, simply set "Number of Dispersion Beams" to zero.</p>
      
      <p>OpticalRayTracer uses several mathematical methods to produce its results (and you got a copy of all the source files when you downloaded the program, so you can examine the methods in detail).</p>
      
      </blockquote>
    
    <a name="Algorithm_Description"></a><div class="article_subtopic">Algorithm Description</div>
    
    <blockquote>
    
    (For a more complete presentation of this topic, visit the <a href="http://arachnoid.com/OpticalRayTracer/documentation.html">OpticalRayTracer technical discussion page</a>.)
    
      <p>OpticalRayTracer first calculates the location of any intersections between tracing beams and spheres or hyperboloids (our lenses). The collision detection mathematics is rather involved and won't be described in any detail here.</p>
      
      <p>Having acquired a list of all possible points of collision for a particular beam, OpticalRayTracer sorts the list of results along the x dimension, then determines which intersection is next (to the right) along the beam's path.</p>
      
      <p>At this point OpticalRayTracer has determined a point of collision between a tracing ray and a lens. The ray and the lens collision point each have a characteristic angle, which is used in the next computation.</p>
      
    </blockquote>
    
    <a name="Snell_s_Law"></a><div class="article_subtopic">Snell's Law</div>
    
    <blockquote>
      <p>"Snell's Law" is a classic optical relationship that, given arguments for incidence angle between two media and indices of refraction for the two media, determines the deflection angle. Expressed in classic form, Snell's Law is:</p>
      
      <blockquote>
        n1 sin(a1) = n2 sin(a2)
      </blockquote>
      
      <p>Where:</p>
      
      <ul>
        <li>n1 = index of refraction of medium 1</li>
        <li>a1 = angle within medium 1</li>
        
        <li>n2 = index of refraction of medium 2</li>
        <li>a2 = angle within medium 2</li>
      </ul>
      
      <p>The astute reader will notice that, in passing from a medium like air with an IOR near 1.0, to a lens with an IOR of 1.5 for example, the angle must decrease. And conversely, a beam emerging from glass to air will show an increase in its angle of deflection. Also, it can be seen that an incident angle of zero will not be deflected — it will remain zero.</p>
      
      
      
      <p>In computing refraction, OpticalRayTracer uses this restatement of the Snell's Law equation:</p>
      
      
      
      <blockquote>
        a2 = arcsin(n1 sin(a1) / n2)
      </blockquote>
      
      <p>Here is a practical example:</p>
      
      
      
      <ul>
        <li>Medium 1: air
          
          <ul>
            <li>n1 = 1.0</li>
            <li>a1 = 20 degrees</li>
          </ul>
        </li>
        <li>Medium 2: crown spectacle glass
          
          <ul>
            <li>n2 = 1.52</li>
            <li>a2 = arcsin(1.0 sin(a1) / 1.52) = 13.00365 degrees</li>
          </ul>
        </li>
      </ul>
    </blockquote>
    
    <a name="Dispersion_Computation"></a><div class="article_subtopic">Dispersion Computation</div>
    
    <blockquote>
      <p>The computation for dispersion follows along similar lines, but with an empirical equation less grounded in physically simple principles (and original with the author). The dispersion equation changes the index of refraction based on the wavelength of the light beam:</p>
      
      
      
      <blockquote>
        ior2 = ior + ((dp - w) * 500000.0) / (abbe * dp * w^2)
      </blockquote>
      
      <p>Where:</p>
      
      
      
      <ul>
        <li>ior = original index of refraction for the medium.</li>
        
        <li>dp = dispersion pivot wavelength, set to 589.3 nm, the sodium yellow line.</li>
        
        <li>w = wavelength of the tracing beam in nm (nanometers).</li>
        <li>abbe = Abbe's Number, a value associated with many glasses and that describes its dispersion property. Lower Abbe's numbers result in higher dispersion.</li>
      </ul>
      
      
      
      <p>Abbe's Number is arrived at in this way:</p>
      
      
      
      <blockquote>
        abbe = (nd-1)/(nf-nc)
      </blockquote>
      
      <p>Where:</p>
      
      
      
      <ul>
        <li>nf = a medium's index of refraction at the 486.1 nm hydrogen blue line.</li>
        <li>nd = a medium's index of refraction at the 589.3 nm sodium yellow line.</li>
        <li>nc = a medium's index of refraction at the 656.3 nm hydrogen red line.</li>
      </ul>
      
      <p>The Abbe numbers for various media are arrived at in laboratory experiments. My equation simply reverses the relationship between the number and its effects, within an accuracy of about 1%.</p>
      
      
    </blockquote>
    
    <a name="Configuration"></a><div class="article_subtopic">Configuration</div>
    
    <blockquote>
      <ul>
   <li>To change a color in the "Configure" panel's selection list, simply click the colored button for the value you want to change. A color selection dialog will appear.</li>
        
       <li>All the configuration values, along with a full description of the lenses you create, are preserved between sessions in a file located at #userdir#/OpticalRayTracer.ini on this system, and the same information can be copied onto the system clipboard with the toolbar "Copy Configuration" button.</li>
     </ul>
      
      <p>Here is an explanation of the controls in the Configuration panel:</p>
      
      <ul>
      <li><b>Domain Barrier Color</b>. This is the color of the left and right-hand barriers that define the experimental domain.</li>
      
        <li><b>Y Baseline Color</b>. This is the color of the reference line at y = 0 in the ray trace display. If you do not want this line to appear, set its color to the color of the display background (see "Display Background" below).</li>
        
        <li><b>Grid Color</b>. This is the auto-scaling grid in the ray trace display. Again, you can turn this off by setting its color to that of the background.</li>
        
        <li><b>Lens Outline Color</b>. This color is used to draw the profile of each lens.</li>
        
        <li><b>Tracing Beams Color</b>. This is the beam color that is used when dispersion is not being computed. Remember that dispersion beams have an internally computed color, appropriate to their wavelength.</li>
        
        <li><b>Beam Intersection Color</b>. This is the color of the dots that mark the intersections between light beams and lens surfaces.</li>
        
        <li><b>Lens Selected Box Color</b>. This color might be better allowed to remain in view, since it tells you which lens has been selected and to which lens the control panel settings apply.</li>
        
        <li><b>Display High Background Color</b>. This color defaults to white, but in some cases, like trying to make out the color of dispersion beams, another color might be better.</li>
        
        <li><b>Display Low Background Color</b>. This color defaults to black, but the user has the option of choosing a different color.</li>
        
        <li><b>Intersection Dot Size</b>. This numeric entry specifies the size of the dots that mark intersections between light beams and surfaces. A positive entry produces circles, a negative entry produces solid disks of color.</li>
        
        <li><b>Y Snap-to-Base Band</b>. This numeric entry sets the threshold for the behavior that returns a lens to the Y baseline when the mouse is released. This is ordinarily a good thing, a feature, but if you prefer this not to happen, set this number to zero. In truth, the feature is always active regardless of the this setting, but if you enter zero, the feature is only active at a threshold value of zero, which ... oh well, I think you get the idea.</li>
        
        <li><b>Beam Width</b>. This setting actually sets the width of all image lines. An entry of zero is ignored, the minimum beam width is 1.</li>
        
        <li><b>Beam Count</b>. This is a setting with an large impact on program performance. OpticalRayTracer's algorithms are swift, but choosing a large number of tracing beams might disable one of its best features: real-time response to user inputs. Also, it is easy to become overloaded with information as the number of beams increases. It is difficult to take advantage of the information presented by more than about 8 tracing beams. Lots of beams can be entertaining, though.</li>
        
        <li><b>Interactions per beam</b>. This determines the limit to interactions for a given beam, to avoid the computation of pointless internal reflections within a lens, for example. The default value is quite large, but a sufficiently complex lens system might require that it be increased.</li>
        
        <li><b>Source Y Start</b> and</li>
        <li><b>Source Y End</b>. These values determine the vertical limits for the array of tracing beams. These two numbers are typically set to fall within the chosen radius of your lenses. The default settings of -1.8 and 1.8 means all the beams fall comfortably within the default lens radius of 2 units (remember that a lens diameter is twice its radius).</li>
        
        <li><b>X Source Plane</b>. This is the location in the x dimension from which the tracing beams emanate. In the ray trace display, zoom out to see the location of the beam origin, then change this number to see what happens.</li>
        
        <li><b>X Target Plane</b>. This is the plane in the x dimension through which the tracing beams pass, regardless of their angle (described below). It is useful as a movable reference point, for example to see how a focusing effort is turning out.</li>
        
        <li><b>Beam Offset Angle</b>. This setting is used to tilt the array of tracing beams, a way to test the off-axis performance of a lens without having to rotate the lens itself. By controlling the source angle you can observe the resulting path through a series of lenses, thus determining the off-axis performance for the entire system.</li>
        
        <li><b>Dispersion Beam Count</b>. This setting produces a set of dispersion beams, with appropriate colors and wavelengths, for each tracing beam. These dispersion beams will be deflected by different amounts depending on specific lens settings, in particular the dispersion value. This is the key to the dispersion effect simulation.</li>
        
        <li><b>Rotate from X Origin</b>. When using a nonzero beam offset angle, this checkbox pivots the beams with respect to X = 0 rather than the X target plane. This allows light beams to be rotated around a lens located at X = 0.</li>
        
        <li><b>Diverging Beams</b>. This checkbox causes the tracing beams to originate in and diverge from a point source located at the X source reference plane, rather than being generated in parallel.</li>
        
      </ul>
      
      <p>Remember that the total number of ray trace computations is equal to the number of tracing beams multiplied by the number of dispersion beams, such that choosing 8 tracing beams and 8 dispersion beams results in 64 traces, fine for a fast computer, but not so great for a slower machine. To prevent the generation of dispersion beams and their associated computation overhead, simply set this value to zero.</p>
      
      
    </blockquote>
    
    <a name="Conclusion"></a><div class="article_subtopic">Conclusion</div>
    
    <blockquote>
      <p>The OpticalRayTracer Home Page is located at <a href="http://www.arachnoid.com/OpticalRayTracer">http://www.arachnoid.com/OpticalRayTracer</a>, where additional documentation and other resources are located. Be sure to visit to make sure you have the latest version of OpticalRayTracer.</p>
      
      
      
      <p>There is a great deal of excellent, detailed information about optics on the Web, both theoretical and practical. Google for "optics," "ray tracing" and related topics.</p>
      
      
    </blockquote>
    
    <a name="User_support"></a><div class="article_subtopic">User support</div>
    
    <blockquote>
      
      <p>There is a more detailed technical description of OpticalRayTracer and optical mathematics in general located at <a href="http://arachnoid.com/OpticalRayTracer/documentation.html">http://arachnoid.com/OpticalRayTracer/documentation.html</a></p>
      
      <p>Because OpticalRayTracer is released under the <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> (but please visit <a href="http://www.arachnoid.com/careware">http://www.arachnoid.com/careware</a> anyway), there is no user support. This help file plus the sort of knowledge available in optical textbooks and online should be sufficient to help the user make it productive.</p>
      
      <p>If you detect a bug in OpticalRayTracer, please report it at <a href="http://www.arachnoid.com/messages">http://www.arachnoid.com/messages</a>.</p>
      
      
    </blockquote>
  </body>
</html>