The Basics of UltraFractal 5 and its Use of Classes
UltraFractal 5 represents a major upgrade of UltraFractal, especially with respect to the creation of formulas. The old programming language for UltraFractal did not allow for the definitions of user-defined functions or for the native import of images. The new programming language uses classes, meaning that it is object oriented. These new terms, and what they mean, will be defined as we work through the tutorial. The change to object oriented programming has also changed the user interface, and this will be the main emphasis in the first part of the tutorial. Of course, all of the old programs still work, and the user interface for the old programs is still the same.
A class is a mini-program that is structured in a way that it can be used with many different types of formulas. When it is used with a formula, it is called an object. In order to use it with a formula, the formula must be written in a way so that the object can be plugged in. For the purpose of understanding the new structures we will call the object a plug-in and the place where it goes a slot. These are not official programming terms, but they will be useful in helping the user understand how classes and objects are used. The big advantage to classes is that a given functionality, as defined by the class, can be used with many different formulas without having to write new code. It also means that the options for a given formula are dramatically expanded with the formula writer needing to write a line of code. As a result the user should be able to create more varied and interesting art without having to try many different formulas.
The class paradigm applies to ufm's (fractal formulas like Mandelbrot), ucl's (coloring algorithms like Orbit Traps) and uxf's (transformations like Kaleidoscope). The classes are stored in a new type of file format called a ulb (class library file). Common.ulb is the foundation class for UltraFractal 5 and contains an extensive collection base classes and utility classes. Users who are familiar with older versions of UltraFractal know that you can click on a ufm, ucl or uxf using the UltraFractal browser and see a list of the formulas available. In UltraFractal 5, if the user has selected a formula that uses classes, the default class will appear in the parameter list with a browser button icon to it right. Clicking the browser button will give a list of all the ulb's available, and clicking a ulb will show the classes that can go into the slot.
There are some differences in how the parameter list appears and how it is used in formulas that use classes. Orbit Traps was the prototype coloring algorithm around which much of the class information was structured during the development of UltraFractal 5, so we will use The class version of Orbit Traps for most of the tutorial.
If you open UltraFractal 5 and have not changed the default settings the location tab should have the following appearance:
If you click the browse button you will see the other coloring algorithms in standard.ucl. Open the one titled Generic Coloring (Gradient). The location tab will now have the following appearance. The fractal in the view window should not have changed:
Notice that the title of the coloring algorithm is now Generic Coloring (Gradient) and Smooth (Mandelbrot) is down in the parameters region. There are actually two versions of Smooth (Mandelbrot), the original which gives the view in the first image, and a class version, which is the default coloring algorithm for Generic Coloring (Gradient), shown in the second image. If you have selected Generic Coloring (Gradient) for coloring, try clicking on the browse button next to Smooth (Mandelbrot). You should see a list of all the coloring classes in standard.ulb. It should look like this:
On the left hand side of the browser window you should see a list of folders, one of which should be named "Public". Double click on the Public folder and select dmj.ulb. You should see the following:
Select Orbit Traps Gradient (UF5). The is the coloring class we will be using for most of this tutorial. The outside tab should look like the following:
We need to further examine how the various plug-ins can be accessed by the user. In the image above the Trap Position plug-in has its arrow in the position to display its parameters. If you set up the coloring formula as described above you should see the Mandelbrot set with a pattern around it. In case you don't have it set this way, here is a upr that will do it for you. Just copy and paste into UltraFractal.
Now try exploring the parameters in Trap Position and Astroid to
see what they do to the image. The behavior should be very much like you are
used to in earlier versions of Ultrafractal.