Fracster is a Java applet; this source code is written in Java. The source is released under the terms of the GNU General Public License, version 2 or later. I didn't write the code to win any beauty contests, and comments are not extensive, but it runs fast.
This code is limited to the facilities of Java 1.1.x for a very good reason. Like it or not, that is still the newest version that can be reliably found in all web browsers that have support for Java at all. Cross-platform, cross-browser compatibility is also the reason why no native user interface widgets are used. I always use -target 1.1 on the javac command line when building the applet.
Please note: yes, you can try replacing the double-precision arithmetic with BigDecimal objects in order to zoom in deeper -- but I've seen applets that do that, and it is amazingly slow. Glacially, horribly slow. Don't say I didn't warn you.
Yes, I'd be glad to see your nifty optimizations of the code. If you wish to share patches, just get in touch via our contact page and I'll provide you with an email address to send patches to.
Enjoy the code.
| File | Description |
|---|---|
| FracsterCL.java | A command line Java application that uses the MandelbrotSet class to produce the nice antialiased thumbnails in the gallery. |
| Fracster.java | The Java applet. Uses the MandelbrotSet class to do the actual rendering of the images. |
| MandelbrotSet.java | Where it all happens. The MandelbrotSet class renders images of the Mandelbrot set by successive approximation, using a variety of techniques to avoid unnecessary calculations. |
| MandelbrotUser.java | Classes that wish to be notified "on the fly" as each pass over the Mandelbrot set image is completed must implement this interface. This allows the applet to update the display with increasing resolution after each pass. |
Follow us on Twitter | Contact Us
Copyright 1994-2012 Boutell.Com, Inc. All Rights Reserved.
