Archive for the ‘Saturn’ Tag

Migration to Qt5   Leave a comment


So far I’ve been using Qt 4.8 on both Linux and Windows 7. The compiler used on Windows 7 was Microsoft Visual Studio C++ version 10.0 which came with Visual Studio 2010 Express. The Microsoft compiler had poor support for C++11 features which meant I had to code my fractal software such that it would successfully compile on Linux and Windows.

Fed up with not being able to use C++11 fully on Windows led me to upgrade to Visual Studio 2015 Community. Since Windows 8, 8.1 and 10 have been released since I first released my software for Windows I went the whole hog and upgraded to Windows 10, upgraded to Qt5 built for 32-bit and Qt5 built for 64-bit using Visual Studio 2015 and upgraded QtCreator to version 4.0.0.

Over on Linux Mint the shift to Qt5 was easy, all I had to do was install the Qt5-default package:

Selecting Qt5

Selecting Qt5

If need be I can easily switch back to Qt4 by uninstalling Qt5-default and installing Qt4-default instead.

Building SaturnQt using Qt5 required just one change to its NetBeans project:

Select project properties

Select project properties


Add QtWidgets

Add QtWidgets

The location of Qt classes has been rearranged so QtWidgets is required for Qt5 but not for Qt4.

The project built without any problems and when SaturnQt was started some differences in appearance were evident, first the main window and the settings window for the Qt5 build:

Main window using Qt5

Main window using Qt5


Settings window using Qt5

Settings window using Qt5

and these are main and settings windows for the Qt4 build:

Main window using Qt4

Main window using Qt4


Settings window using Qt4

Settings window using Qt4

There are some obvious differences:

  • The window background colour is lighter using Qt5.
  • The height of the iterations box is the same as the zoom selection combobox using Qt5, they are not when using Qt4.
  • The list cursor is blue instead of green using Qt5.

There are other minor differences. In short Qt5 doesn’t match the MATE theme I’m currently using with Linux Mint. It should be possible to solve this issue and when I do I’ll post it on this blog.

Back to Windows. The project file for SaturnQt already had a check for Qt5 and automatically adds QtWidgets. QtCreator was then configured to use the 32-bit build of Qt 5.6 and to use the Visual Studio C++ version 14.0 compiler. The first build failed as std::max requires the inclusion of <algorithm> which is not required for Linux it has been added to the source code causing no issues for the Linux build. In addition there were a large number of warnings, I’ll cover these when I compare g++, clang++ and the Microsoft compiler in an other post.

Running the project successfully started SaturnQt on Windows 10:

Main window on Windows 10

Main window on Windows 10


Settings window on Windows 10.

Settings window on Windows 10.

I haven’t yet built a 64-bit version for Windows 10 as I need 64-bit libraries for MPIR and MPFR (for multi-precision arithmetic) and the QtCreator project file needs to be modified to support 64-bit builds. There will be a post on building 64-bit versions of my software for Windows in due course.

Qt5 versions of my software will not be available until I’ve finished the next versions and sorted out the release packages which will be affected by the transition to Qt5.

Advertisements

Octics Part 1   Leave a comment


This post refers to Saturn and Neptune, they are programs for exploring fractals and are available from the download page.

Octic fractals are generated using an eighth order polynomial, the eighth power Mandelbrot is a special case where all coefficients except that for z8 are zero. It has a single critical point at zero in common with all Mandelbrots defined using the following general formula:

z = zn + c

where n is an integer greater than or equal to 2.

The eighth power Mandelbrot can be found in the list of Saturn fractal types under the name M08 Mandelbrot. It looks like this:

Eighth power Mandelbrot

Eighth power Mandelbrot

Saturn also has a fractal type called Octic which is a full polynomial, its formula is:

z = αz8 + βz7 + γz6 + δz5 + εz4 + ζz3 + ηz2 + θz + ι

For use with Mandelbrot algorithm at least one of the parameters (or coefficients) must be the location in the complex plane (usually denoted as c) for convenience ι is set to c. When using the Mandelbrot algorithm the initial value of z is set to a critical point, other values can be used and resulting pictures are “perturbed”. So what are the critical points of an “Octic”? Critical points are the roots of the first derivative of the fractal formula.

So, for Octic:

f(z) = αz8 + βz7 + γz6 + δz5 + εz4 + ζz3 + ηz2 + θz + c

the first derivative is:

f'(z) = 8αz7 + 7βz6 + 6γz5 + 5δz4 + 4εz3 + 3ζz2 + 2ηz + θ

The critical points are the roots of:

f'(z) = 0

I mentioned earlier that any of the coefficients of the polynomial can be the location in the complex plane, in which case, the critical points have to be calculated for every location. Neither Saturn nor Neptune can do this which is why ι was set to c. Saturn only allows a number or the location in the complex plane to be used as the initial value for z. So what value should be used? It is possible to zero out some of the terms so that some critical points can be found relatively easily but that precludes the use of all the terms, solving f'(z) = 0 where all the terms of the polynomial are present isn’t easy, fortunately you don’t have to work them out as Neptune can do it for you. Neptune was specifically designed to produce pictures of fractals with multiple critical points, its version of Octic is MC 8.7.6.5.4.3.2.1.

To start the exploration of Octic fractals all parameters except ι are set to 1, i.e.:

f(z) = z8 + z7 + z6 + z5 + z4 + z3 + z2 + z + c

Neptune produces this picture:

Octic f(z) = z8 + z7 + z6 + z5 + z4 + z3 + z2 + z + c

Octic f(z) = z8 + z7 + z6 + z5 + z4 + z3 + z2 + z + c

Saturn can only produce pictures using one critical value at a time, the z0 value to be used can be found on Neptune’s settings window:

Neptune's settings window

Neptune’s settings window

Using the first and sixth critical points Saturn produces:

First critical point

First critical point

Sixth critical point

Sixth critical point

Zooming into an area at the left hand size of the sixth critical point picture standard second power Mandelbrot islands can be found.

Mandelbrot Islands

Mandelbrot Islands

There are no eighth power Mandelbrot islands (multibrots) as found in the first picture of this post.

Multibrot islands

Multibrot islands

Saturn can also generate Octic Julias, the Julia algorithm uses c as the initial value where all parameters have fixed values. Here is an example Julia using the Julia form of the formula used for the pictures above:

Octic Julia ι = 0.17 - 0.33i

Octic Julia ι = 0.17 – 0.33i

There is an enormous variety of Octic “Mandelbrot sets” here are two examples using different coefficients:

Octic f(z) = z8 + z7 + 3z6 + z5 - 0.5z4 + z3 - 2z2 - 0.6z + c

Octic f(z) = z8 + z7 + 3z6 + z5 – 0.5z4 + z3 – 2z2 – 0.6z + c

Octic f(z) = z8 + z7 + z6 + 2z5 + z4 + z3 + z2 - z + c

Octic f(z) = z8 + z7 + z6 + 2z5 + z4 + z3 + z2 – z + c

Where all terms of the polynomial are present only Octic Mandelbrot sets will contain second power Mandelbrot islands. Zeroing out various terms other than z8 and c results in sets that contain both Mandelbrot and cubic Mandelbrot islands. Higher order Mandelbrot islands are also found, I don’t know whether more than two types of Mandelbrot islands can be present in the same set, over the course of the next parts I intend to find out.

Neptune will be exclusively used from now on, so no more Julias. Neptune has 9 version of the Octic formula with the number of critical points varying from 7 to 2:

  • MC 8.1 z = αz8 + βz + c
  • MC 8.2 z = αz8 + βz2 + c
  • MC 8.3 z = αz8 + βz3 + c
  • MC 8.4 z = αz8 + βz4 + c
  • MC 8.5 z = αz8 + βz5 + c
  • MC 8.6 z = αz8 + βz6 + c
  • MC 8.7 z = αz8 + βz7 + c
  • MC 8.7.6 z = αz8 + βz7 + γz6 + c
  • MC 8.7.6.5.4.3.2.1 z = αz8 + βz7 + γz6 + δz5 + εz4 + ζz3 + ηz2 + θz + c

Part 2 will focus on MC 8.1.

Posted 19 September 2014 by element90 in Fractal, Mathematics, Software

Tagged with , , , ,

Another Unexpected Difference   3 comments


I received a query regarding the implementation of a fractal formula that didn’t produce the expected pictures. Here is such a picture. The implicated culprit was std::complex<T>, I’ve had trouble with this in the past leading to the use of my own version of the complex class in my software, it looks like it is entirely innocent.

I checked the formulae by trying them out in Saturn which also failed to produce the expected pictures. The program used for producing the fractals is called XoaS, the fractals in question aren’t part of XaoS but can be produced by setting the user formula.

An example of these formulae is shown below:

zn+1 = zn^(1 – (1/(log(z) + 0.1))) + 0.3

where z0 = the location in the complex plane

This is what is produced by the Window’s version of Xaos (the image is centred on (0,0) and has a width of 3):

XaoS.Windows

The Linux version of XaoS would be expected to produce the same image, it doesn’t (the image is centred on (0,0) and has a width 8):

XaoS.Linux

Saturn produces this (the image is centred on (0,0) and has width 32):

Saturn

Gnofract4d agrees with Saturn:

Gnofracta4d

Ultra Fractal also agrees with Saturn and Gnofract4d, the much smaller circle produced by XaoS for Linux must be to do with its bailout function, the bailout value is 4 which is the same as Gnofract4d and Saturn where the absolute value of z is used (abs(z) in Saturn, cabs in Gnofract4d).

The picture for the Linux version of XaoS took several attempts, initially there was just featureless black, zooming out I got a simple circle, but it was only when I went back to XaoS on Linux to check the location and size of the image that the blobs appeared.

I’ve now found that Saturn produces the same image as XaoS on Linux when the bailout function is changed to norm(z).

I can only conclude that the fractal images produced by the Windows version of XaoS are in error, as XaoS, Gnofract4d and Saturn on Linux and Ultra Fractal on Windows all produce the same image.

The images produced by Saturn for fractals with similar formulae are not all interesting so fractals of this sort won’t be added to Saturn. The erroreous images produced by XaoS on Windows on the the other hand are definitely worth adding to any fractal program provided the error can be found and replicated, indeed Saturn already has several fractal types found due to programming errors.

Strange Attractors – An Alternative Approach   2 comments


Strange attractors are a category of fractal that have not featured in Saturn and Titan. For version 4.0.0 a new fractal type called Attractors has been introduced which is a generalised formula which has been extended so that it can be calculated using the Mandelbrot algorithm or the Julia algorithm and the resulting orbits plotted, it can also be coloured as though it were just any other escape time (or bailout fractal). In short Saturn treats the Attractors formula in the same way as all the other defined formulae with the exception of Lyapunov fractals.

The usual way of producing Strange Attractors is to start at a random location and then calculate a single very long orbit (typically 10s of thousands of locations in length) and plot each location in the orbit. Saturn plots a very large number of orbits of a very short length (typically 15) with the starting location of each orbit taken from a grid, all points on the grid are used to calculate an orbit.

The Attractors formula is based on two named Strange attractor types: de Jong and Clifford. The de Jong formula is as follows:

xn+1 = sin(a*yn) – cos(b*xn)
yn+1 = sin(c*xn) – cos(d*yn)

The Clifford formula is:

xn+1 = sin(a*yn) + c*cos(a*xn)
yn+1 = sin(b*xn) + d*cos(b*yn)

Saturn implements both these formula as follows:

Screenshot-Saturn - Settings

The parameters A to H are ordinary “real” numbers, function parameters f1 to f4 can be assigned to any of the functions defined for Saturn, z and α are complex numbers. To produce de Jong and Clifford attractors the parameters are assigned the appropriate values, α is set to zero and z0 is set to the location in the complex plane.

As Attractors is a Saturn formula transforms can be applied to z for extra variations. The Attractors fractal can be calculated using the Mandelbrot algorithm by setting α to the location in the complex plane.

The Attractors fractals produced by Saturn and their equivalent Strange Attractors can differ. The differences appear to be an artefact of the method used to plot the fractal, mostly the differences can be removed by omitting the first few points in an orbit. There are other programs that produce plots of de Jong and Clifford attractors and there are plenty of example pictures elsewhere on the web, sometimes the images are upside down in relation to those produced by Saturn.

Time for some pictures:

Clifford Attractor

Clifford Attractor

The picture above shows a Clifford attractor, it looks distinctly different to the image produced using the usual method for plotting strange attractors, an example how it usually looks can be found here. So why the difference? The calculating area used for orbit plotted fractals defaults to 9 times the display area which helps to display Pickover Popcorn correctly, for this image the entire plot is in the display area so the calculating area can be reduced to same as the display area which changes the image:

Clifford Attractor - calculating area equals display area

Clifford Attractor – calculating area equals display area

As can be seen a significant proportion of the plots have vanished but it is still far from the usual plot of this particular strange attractor. Since it can take a few iterations before the Strange attractor settles down, omitting a number of the initial points for every orbit calculated will reduce the number of plots that aren’t really part of the strange attractor. The following pictures show how the image changes as the number of omitted initial points in the orbits is increased.

Omit 1

Omit 1


Omit 2

Omit 2


Omit 3

Omit 3


Omit 4

Omit 4

All the preceding pictures used an orbit length of 13. To get an image that looks like the usual plot of this attractor several adjustments where necessary, the orbit length was increased to 40 and the number of omitted plots per orbit was increased to 20. A further adjustment is also available and that is the plot density, default density is one so for an 500×500 image 250000 orbits are calculated, the density can increased and for the final version of this attractor the density has been increased to 6 so that 1500000 orbits are calculated for the same area. The colours are also different as the colour map has been changed, the colour method is to use the logarithm of the number of times a location has been visited by an orbit and then scaled, the resulting value is used to look up a colour in the assigned colour map. The background, i.e. areas not visited by any orbits, is set to white.

Final version

Final version

Some attractors can be very sparse and consequently not that suitable for works of “art”. The extra plots that aren’t really part of the attractor that are calculated by Saturn’s method can produce pleasing results. The usual method starts at a random location and only one orbit is plotted so the effect of the initial plots in the orbit has virtually no affect on the final image, the method used by Saturn has thousands upon thousands of orbits so the initial plots build up significantly affecting the final image.

Here is Saturn’s plot of a de Jong Attractor, again with default calculating area that is 9 times the size f the display area.

A de Jong Attractor

A de Jong Attractor

And here it is stripped of its initial plots and it is very sparse indeed.

The bare Attractor

The bare Attractor

The bare attractor and the over plotted Saturn version are both unsatisfactory so some balance between the two would be preferred.

Calculating area equals Display Area

Calculating area equals Display Area


Density increased to 16

Density increased to 16

So that concludes an explanation of how Strange Attractors have been implemented for Saturn and Titan, the formula can also used to produce pictures that aren’t strange by setting the extra parameter α to something other than zero and for no orbit plotted fractals. I will cover those variations in a future post.

Guide to Cczcpaczcp Part 7   Leave a comment


This is the last part of the guide to Cczcpaczcp. There will be example pictures of Cczcpaczcp with non-integer, imaginary and complex powers and the use of a formula transform.

As it has been a while since part 6 here is a reminder of the formula:

zn+1 = c(αznβ + γznδ)

Example 1

α = 1
β = 2i
γ = 1
δ = -2
z0 = 0.623832938258 – 0.258400063681i
Bailout: norm(z) > 160000000

Example 1

Example 1

Example 2

α = 1
β = 2i
γ = 1
δ = -2i
z0 = 1
Bailout: norm(z) > 1600000000000000

Example 2

Example 2

Example 3

α = 4.2
β = -4.2
γ = 4.2
δ = 4.2
z0 = 1
Bailout: norm(z) > 16000000

Example 3

Example 3

Example 4

α = -2
β = -2.25
γ = 1
δ = -4.5
z0 = 1
Bailout: norm(z) > 16000000

Example 4

Example 4

Example 5

α = 1
β = 2i
γ = 1
δ = -2i
z0 = 1
Bailout: norm(z) > 16

Example 5

Example 5

This example uses the same parameters as example 2 but with a greatly reduced bailout limit. The circle void present in example 2 and would’ve engulfed this Mandelbrot if the higher limit had been used. The colour map (gradient) and colouring method are also different.

Example 6

α = 1
β = 3 + 3i
γ = 1
δ = -3 – 3i
z0 = 1
Bailout: norm(z) > 1600000000

Example 6

Example 6

Example 7

transform: z = ez
α = 1
β = 1
γ = 1
δ = -1
z0 = 0
Bailout: norm(z) > 160000

Example 7

Example 7

This example is a little different as it is the first to have used a formula transform, the formula used becomes:

z ← c(αeβz + γeδz)

You’ll have noticed that I’ve used ← instead of z and subscripts for this formula, I’ve done this as HTML doesn’t really handle mathematical formulae. I need better way and when I find it there may even be blog post about it.

I used this particular transform for this example because the critical value was easily calculated and turned out to be zero. The are many other transforms available in Saturn and can be applied in combination and even even periodically changed as each location is calculated, mostly this will cause the critical value to be meaningless. The critical value does not need to be used, other values will mean the loss the Mandelbrot islands but that doesn’t mean the resulting pictures aren’t aesthetically pleasing.

This guide has shown that Cczcpaczcp has enormous scope regarding the variety of fractal pictures it can produce despite having a very awkward name.

Mandelbrot Variations   Leave a comment


The Mandelbrot can be modified by transforming the complex plane. The examples here are created by using one or two “inversion circles”, all the points inside the circles are inverted and all the points outside the circles are left alone, the transform is called “inverse fold out”. All the variation except “Crescent Within” use the “inverse fold out” transform, “Crescent Within”, uses a different transform, “inverse fold in”, followed by an “inverse fold out” transform. The “inverse fold in” transform inverts all points outside the circle and leaves the points inside the circle alone.

Crescent Mandelbrot

Crescent Mandelbrot

The “Crescent Mandelbrot” uses one transform which is set using Saturn’s Transforms Tab:

Transforms Tab

Transforms Tab

The transform is at the origin of the complex plane, all the variations shown in this post have their transform(s) placed along the real axis, the width of the transform (diameter of the circle) is varied.

By carefully positioning the transform and using the appropriate diameter for the circle the Mandelbrot can be “hollowed out” like so:

Hollowed Out Mandelbrot

Hollowed Out Mandelbrot

The first two variations used a single transform, the following variations use two transforms:

Crescent Within

Crescent Within

At this point dreaming up titles became so difficult that I abandoned any attempt, so the titles were reduced to just “Transformed” and a number, starting at four as there had already been three variation on a theme.

Transformed No. 4

Transformed No. 4

Transformed No. 5

Transformed No. 5

Transformed No. 6

Transformed No. 6

Transformed No. 7

Transformed No. 7

For those of you following my blog, you’ll have expected “Into the Depths No. 33” to have been posted today, generation of that fractal hasn’t yet completed. Updates to the series “Into the Depths” and “Zoom into Somewhere Else” will become increasingly infrequent as the journeys in the Mandelbrot get deeper and deeper. To fill the gap there will be other posts such as this one, there will soon be a new series of posts journeying into the depths of the cubic Mandelbrot. I intend to continue posting two posts a day as long as circumstances allow.

Saturn and Titan version 2.0.1   Leave a comment


While preparing the new issue of the Saturn Guide I came across several bugs in version 2.0.0. There were bugs in both Saturn and Titan, these have now been fixed and the new versions can be downloaded. Details of the bugs can be found in the release notes. In addition Saturn now has a splash window.

The Saturn Guide requires some proof reading, when it is ready I’ll make it available for download. There were several pictures in issue 1 of the guide which were available as seed files, for the new issue the number of pictures that can reproduced has been increased and will be provided as parameter files.

Posted 8 April 2012 by element90 in Fractal, Software

Tagged with , , , ,

%d bloggers like this: