Ogless provides a fractal generator as just one of its image effects. Ogless is far more feature rich compared to other generators which only use standard fractals and a very limited range of variability and flexibility. The images that it creates are so varied and alluring that we have a gallery of some of the many excliting images it can produce.
Fractals are a branch of mathematically defined algorithms that can generate complex computer generated images.
The basis of the computation could not be much simpler, it involves the repeated squaring of a complex number (a number with real and imaginary parts).
a = x + iy;
a2 = (x+iy) * (x+iy);
a2 = x2 + 2iy + i2y;
a2 = x2 - y2 + 2ixy;
The real part of the result (x2 - y2) and the imaginary part (2ixy) are then passed to the next iteration. The standard fractal set is produced in graphical form by counting how many times this loop is executed before (x2 + y2) exceeds a certain value. The count of loop iterations is often converted to a color value and plotted according to the value of the initial position (x,y) value.
Without knowing the details of what the function does, it is clear that an initial point very close to the origin (x=0; y=0) will take a very large number of iterations to reach the limit (maybe never). In contrast, a point far from the origin will take very few iterations to reach the limiting value. It is the small region in between the two extremes that generates all the 'pretty' fractal patterns.
Fractal code in C++
double Fx, Fy, Initx, Inity, Sqx, Sqy;
Fx = Initx;
Fy = Inity;
for (Loops = 0; Loops < MAX_LOOP_ITERATIONS; Loops++)
Sqy = Fy*Fy;
Sqx = Fx*Fx;
if (Sqx + Sqy > 2.0) break;
Fy = 2.0*Fx*Fy + Inity;
Fx = Sqx - Sqy + Initx;
// Plot the value of 'Loops' as a color for the initial position Initx, Inity
The most surprising feature of the Mandelbrot and Julia sets is that the intricate detail revealed is infinite in depth. If you zoom in on a small region then the smaller region is broadly similar to the larger one, and you can zoom in indefinitely - up to the limits of the capabilities of the processor. When you see a typical part of the fractal set you'll see spirals made up of spirals, each smaller spiral is a miniature version of the larger version.
The concept has been broadened to a general 'fractal' concept for anything that is similar on one scale than on another scale.
There are many different fractal algorithms that have been discovered. It is a powerful concept that can be applied to many fields of knowledge.
The clearest example of a general fractal concept working in real-life comes from something amazingly simple. How do you measure the length of the coastline? It seems on face value a silly question, I just take a map and move around the coast totting up each mile measured. But then by doing this you are making an approximation, the coastline wiggles in and out and you should really take account of each cove and inlet. So the first figure is too low, but then where do you stop? When computing the length of coastline should you get the most detailed map and go around every cliff outline? But it does not stop there, as you can then consider whether each rock provides an extra level of detail that needs to be added. Moving from coves and beaches to rocks is one 'fractal' level as we then hit another consideration. Should each and every rock be considered? Some rocks are very angular going into each crevice would greatly add to the total. Even smooth rocks are made up of very angular crystals under a microscope. The search goes on down to the molecular and atomic scale. The coastline can be considered infinite in length, it all depends what level of detail you stop looking any further at. The fractal levels identified are cove/rock/crystal/molecule all with internal structure.
Another example of fractal scales is astronomical orbits. The moon goes around the Earth, the planets around the Sun, the Sun around the Galaxy and the Galaxies around the Galactic cluster. Also consider road networks, start at the motorway or inter-state highways and then main roads, small roads and lanes, they are all roads but differ in scale.
The interest in 'levels' of fractal has led to its application to human affairs. Can the rules and structures at the level of a state be applied to companies, cities and individuals? Re-using the same concepts at different levels can greatly simplify the situation. In software design it is also appealing to re-use the same set of procedures and functions on different objects at a different scale.
Often finding a set of fractal levels not only simplifies design but simplifies the understanding of a system as there are fewer concepts to take in.
On a computer a fractal is usually computed using floating point arithmetic as this keeps the same level of accuracy for very large and very small numbers however it is still only an approximation and there comes a point where floating point 'rounding' and other errors creep in and affect the result. If you 'zoom' in a long way on a PC you will end up with a 'blocky' pixelated image just because of the limited size of representation of the number on it. If the floating point calculation uses a larger mantissa (more bits) then these effects will be delayed for longer. Intrinsically, as far we can tell the fractal set contains an infinite amount of detail, you never reach a point where there is no smaller structure.
One of the exciting possibilities for fractals in the future is the very efficient encoding of complex data. This is most easy to see in the case of an image, the data required to create a fractal image is tiny - just some start parameters. The image produced with these parameters has a great deal of data that if we used an excellent compression file format would still require megabytes to store. So the attraction is very clear to see, from a few tens of bytes it is possible to encode something that would otherwise take megabytes to encode. As the Mandelbrot fractal set is 'infinite' the parameters should be able to specify some values that would approximate any image we want to encode. However finding a match is not easy, there is no real way to try to find a matching set of parameters other than trying them all in turn.
The standard fractal algorithm is quite appealing but lacks something. It is just a bit too repetitive and regular. There are lots of interesting spirals but they all look somewhat similar even with different colors. What Ogless has set out to do is to create new algorithms unique to Ogless that enliven the displayed fractal image. It does this by making slight changes to the basic fractal computation - adding extra parameters and modifying others. We have ended up with eleven different variations of the fractal algorithm. Here is a list of them with some screenshots of what can be created using each one.
|Name & Description||Sample screenshot image|
Here is the original Ogless fractal algorithm that we developed. It produces some very strange shapes - mainly heavily distorted and it takes a while to find an area that is not just 'random' linear curves and blobs.
It is tempting to think that the combination of the smooth waves created by the trigonometric functions and a fractal should produce an interesting effect. However the sine function is not 'fractal' in nature - it is just a smooth curve and so the combination lacks the infinite depth of detail of the original, however there are areas where the superimposition creates pleasing symmetrical effects. In most areas the combination looks like a 'lens' distortion of the original fractal.
Quite by chance it was found that fiddling with the basic algorithm produced pleasing spherical looking 'beads' within the standard fractal landscape.
If you take one area of the fractal set and combine it with another area then you'd expect to get some interesting effects. In fact, this algorithm looks less disturbed by the combination than might be expected.
By modifying the fractal algorithm as often as not you produce a distorted image. In the Lace variant the images produced are full of swirls and blobs rather than spirals. Many parts of this set are however just linear edges with no fine detail.
A modified form that still keeps the repeated 'spiral' motif characteristic of standard fractals. However in this case there are areas of transition that have an interesting 'contorted' look. In some ways this is a mixture of Julia and Mandelbrot sets.
The concept used in this modified fractal is to add a repeated step to the algorithm, this had unexpected effects producing some of the most beautiful and least 'fractal' looking images.
Another way of combining two areas of the fractal set was discovered that is similar to Superimpose (1) but subtly different.
As the name implies, this algorithm produces what looks like squashed versions of the standard fractal. Sometimes so squashed it just looks a mess so the area to view needs to be fairly selective.
One thing that makes fractal images boring is that they are so regular. This algorithm deliberately seeks to break it up a bit by adding lines and curves that seem to cut across the normal infinite spirals.
A quaternion is just saying everything is to the power 4. In our adaptation of this we have managed to produce fractals of intricate depth and beauty.
Copyright © Ogless and Silurian Software 2008-2013