| Home | | Java | | ![]() | ![]() | Share This Page |
A virtual lens design workshop.
Copyright © 2011, P. Lutus. All Rights Reserved.
Current Version: 3.2 (04/02/2011)
The Applet | The Details | DocumentationIt's important to distinguish between pictures and reality. What you see below is not a picture of an application — it's a running copy of OpticalRayTracer. Please feel free to experiment with it — you can't hurt it, or your computer, and it might be fun. Click the
Help button for detailed instructions.
The above window gets around the fact that applets don't have access to the system clipboard. Your work will be saved as a cookie when you exit this page, but you can also copy and paste individual lens specifications, or the entire program configuration, into this "clipboard" window, and then copy / paste from the window.
One solves this rather silly limitation by downloading OpticalRayTracer and running it as a local application instead of an applet — read on.
OpticalRayTracer is a free (GPL) cross-platform application that analyzes systems of lenses. It uses optical principles and a virtual optical bench to predict the behavior of many kinds of ordinary and exotic lens types. OpticalRayTracer includes an advanced, easy-to-use interface that allows the user to rearrange the optical configuration by simply dragging lenses around using the mouse.
OpticalRayTracer fully analyzes lens optical properties, incuding refraction and dispersion. The dispersion display uses color-coded light beams, as shown above, to simplify interpretation of the results.
Educators take note: OpticalRayTracer has significant educational potential in the teaching of basic optical principles, and it has some entertaining and game-like behaviors to hold the student's attention.
OpticalRayTracer includes a detailed tutorial/help file to assist the user in getting started in this interesting activity, and this online documentation is also available.
OpticalRayTracer is © Copyright 2011, P. Lutus. All rights reserved.
OpticalRayTracer is released under the General Public License.
OpticalRayTracer is also Careware (http://arachnoid.com/careware),
unless this kind of idea makes you crazy, in which case OpticalRayTracer is free (e.g. GPL).
OpticalRayTracer is a Java application, so it requires a Java runtime engine in order to run. Click this link to pick up your free Java runtime.
There are three download packages:
For the Windows download, install it as an ordinary application, but remember you need a free Java runtime engine, available here.
For the cross-platform Java JAR file, place the executable in any convenient location and run it with this invocation, usually placed in a shell script:
java -jar (path)/OpticalRayTracer.jar
For the source archive, licensed under the GPL, unpack it in the usual way and make sure you have an up-to-date copy of Netbeans.
OpticalRayTracer was originally written in C++ for speed, but several things happened to force a reëvaluation and rewrite in Java. One is that Windows users couldn't use the program. Another is that I spent a fantastic amount of time dealing with inquiries that looked more or less like this:
I saw mention of this package in the context of debian, and tried building it on my Debian Etch system.
After installing some required dependencies, it suggested that all was ok to run make.
The result was as below. My understanding is that aclocal/automake/autoconf should not
be required for a 'tarball install' ? I did a clean configure, then ran aclocal,
then a make/make-install seemed to work fine. I think this means that aclocal needs
to be run before the tarball is released?
===============================
$ make
cd . && /bin/bash /home/neil/raytracer/admin/missing --run aclocal-1.6
/home/neil/raytracer/admin/missing: line 46: aclocal-1.6: command not found
WARNING: `aclocal-1.6' is missing on your system. You should only need it if
you modified `acinclude.m4' or `configure.in'. You might want
to install the `Automake' and `Perl' packages. Grab them from
any GNU archive site.
This sort of exchange became more frequent as the years went by. Then Trolltech, the maintainers of the GUI package I had foolishly decided to use (Qt), unceremoniously abandoned and replaced it, without any effort to assure compatibility or interoperability between the old and new versions. Essentially Trolltech required that everyone stop whatever they were doing, sit down and write all their applications over again, in order to keep them operational.
Java has a number of drawbacks of its own, but it works on any platform, and its graphical interface (Swing) is relatively stable. Over time I find myself rewriting more applications in Java just because I don't have to deal with people's installation difficulties, which frees me to write new computer programs instead of struggling with the old ones.
Because of what OpticalRayTracer does, I was concerned that under Java it wouldn't be fast enough to deal with the computation workload. But this turns out not to be an issue, and the mature Java interface allowed me to add a number of things that were not practical in the earlier versions.
As is true of most of my recent programs, OpticalRayTracer remembers absolutely everything between uses, and the user can even copy to the clipboard a plain-text snapshot of the program's complete state for transmission to a friend or to archive for future reference.
This version of OpticalRayTracer is in every way superior to the old. It runs in more places, it is designed better, it completes some details that were left unfinished in the old version, and it has a much better way to import and export lens descriptions and program state.
| Home | | Java | | ![]() | ![]() | Share This Page |


Share This Page