Fractal Applet

fractalApplet_1

This is a Java application I developed during one of my breaks between school terms. It allows users to draw fractal images using an Iterated Function System (IFS).

Fractals are objects that exhibit self-similarity; part of it looks like the whole, or a recurring part of it. One of the most commonly recognized fractals is Sierpinski’s Triangle, whereby you start with a single triangle, divide it into 4 equal triangles and remove the center piece. Now you repeat the process for each of the 3 remaining pieces, treating them as “new wholes”, infinitely many times.

https://www.mathsisfun.com/images/sierpinski-triangle-evolution.gif

5 iterations building the Sierpinski Triangle.

There are many ways to create fractal images, and this is simply one of them, but it highlights a common problem: how does one go about rendering an image that has an infinite amount of detail? This project represents an attempt by myself to build an approachable program that allows users to create their own fractal images and study their properties, with any mathematical background.

I took a course on fractal geometry and my professor was using software he had made in the 90’s. I decided to spend my winter holidays making my own version, and improved it by allowing users to change the fractal by using the mouse, instead of calculating the parameters of each matrix by hand then seeing the results (we spent hours doing that).  Furthermore, I improved upon the existing implementation of the Chaos Game by introducing a multi-threaded approach, leveraging modern processors to render the images in real-time (with quality dependent on the host’s processing speed). With the increased speed, users can see the effects their interactions have on the fractal image as they are performed, in favour of manual calculation.

So while it was more or less an exercise to familiarize myself with programming 2D graphics / GUI applications in Java in a couple weeks, it is ultimately meant to replace the software used in the next offering of the course; I was later contracted by my school to spend more time developing the tool, and the result is what you see!

To try out my application, you can download the Java Applet here (.jar).
** Note: the latest version of Java may be required to run the software at the link.

To download the source code, click here (.rar).

To read more about how the applet works, you can find additional documentation here.

 

 

Leave a Reply