GPU accelerated Root-Finding Fractals

See this post for my previous explorations of Root-Finding Fractals.

A while back I implemented a Custom Formula Editor in Visions of Chaos. The Custom Formula Editor allows users of Visions of Chaos to program their own fractal formulas which run on their GPUs for much faster performance than when using the CPU for calculations.

One of my hopes for coding the custom editor was that users of Visions of Chaos would make their own formulas and share them with me to include in future releases.

Recently I was contacted by Dr Bernd Frassek who was working with Root-Finding Fractals. See here for more of Dr Frassek’s information about these root-finding methods. For an English version see this Google translated version. Being much more of a mathematician than I am, he was able to implement a lot more root-finding methods that I had never experimented with or even heard of. The total count of methods for finding roots went from 4 in my previous version to 23 in the new mode.

With some more testing and a bit of back and forth emails we were able to get the code working and the end result is a new GPU accelerated Root-Finding Fractals mode in Visions of Chaos. You can find this new mode under “Mode->Fractals->Root-Finding Fractals 2”. All of the formulas, methods, coloring and orbit trap settings from the older Root-Finding Fractals mode have been migrated to the new mode.

If you are interested in coding these sort of fractals yourself you can see the latest GLSL shader source code (as of the 8th of March, 2021) by clicking here.

You can also check the “Show shader code” checkbox in the Root-Finding Settings dialog which will cause Visions of Chaos to show you the generated shader code before rendering the fractal image.

Here is a sample movie showing some results from the new mode.

This next movie uses orbit traps.

If you have any other formulas or root-finding methods that you would like to see implemented let me know. The structure of the shader allows new formulas and root-finding methods to be added relatively easily.

Jason.

Hybrid Fractals

Hybrid fractals occur when you alternate between fractal formulas during the inside iteration loop of generating a fractal. The idea came from posts on the old Fractal Forums site.

For example, rather than the usual Mandelbrot Fractal iteration, you can modify the inside loop to alternate between the Mandelbrot, then the Burning Ship, then the Mandelbrot, and the Mandelbrot again. You then repeat the sequence for as many iterations as that pixel needs.

This gives a result like the following

The code to create this (and other hybrid formulas) is included with Visions of Chaos, but you can also see the OpenGL shader code for it here.

I have also used the same hybrid technique for 3D Mandelbulb Fractals as shown here.

Jason.

Color tweening during fractal zooms

After a good suggestion from one of my long term users I have now added the ability to change the color palette during fractal zoom scripts in Visions of Chaos.

When creating a zoom movie script you can change and set a color palette for every key frame. While Visions of Chaos generates the movie frames the colors of the palettes will smoothly fade from one palette to the next.

Here is a quick sample movie showing the results. A different color palette was specified for the key frames every 2 seconds.

Jason.

10 years on YouTube

Today marks 10 years since I started my YouTube channel.

Back then a video with a resolution of 240p (426×240 pixels) like the following was considered OK.

These days I can upload a 4K video (nine times the vertical and horizontal resolution of that 240p video) and once YouTube puts it through their internal conversion routines it will usually come out looking excellent.

Jason.

The Burning Ship Fractal

The Burning Ship Fractal is a slight variant on the Mandelbrot Set Fractal.

The basic Mandelbrot Fractal formula is z=z^2+c. The Burning Ship Fractal formula is z=abs(z)^2+c.

The following image is the standard power 2 Burning Ship Fractal rendered using CPM smooth coloring.

Burning Ship Fractal

Zooming in to the right antenna part of the fractal shows why it was named the Burning Ship.

Burning Ship Fractal

The next 3 images change the exponent 2 in z=abs(z)^2+c to 3, 4 and 5.

Burning Ship Fractal

Burning Ship Fractal

Burning Ship Fractal

The same power 2 through power 5 Burning Ships but this time using Triangle Inequality Average (TIA) coloring

Burning Ship Fractal

Burning Ship Fractal

Burning Ship Fractal

Burning Ship Fractal

The next 4K resolution movie shows a series of zooms into Burning Ship Fractals between power 2 and power 5 colored using CPM coloring

and finally another 4K movie showing more Burning Ship zooms colored using TIA coloring

All of the above images and movies were created with Visions of Chaos.

Jason.

Meta-Mandelbrots

Ian McDonald came up with a new novel way to render Mandelbrot (actually Julia) Set fractals.

The usual Mandelbrot fomula is
z=z*z+c

Taking the z*z+c part, replace the z’s with (z*z+c) and replace the c’s with (c*c+z)

After one level of replacement you get
((z*z+c)*(z*z+c)+(c*c+z))

Level 2 is
(((z*z+c)*(z*z+c)+(c*c+z)) * ((z*z+c)*(z*z+c)+(c*c+z)) + ((c*c+z)*(c*c+z)+(z*z+c)))

and Level 3 is
((((z*z+c)*(z*z+c)+(c*c+z))*((z*z+c)*(z*z+c)+(c*c+z))+((c*c+z)*(c*c+z)+(z*z+c)))*(((z*z+c)*(z*z+c)+(c*c+z))*((z*z+c)*(z*z+c)+(c*c+z))+((c*c+z)*(c*c+z)+(z*z+c)))+(((c*c+z)*(c*c+z)+(z*z+c))*((c*c+z)*(c*c+z)+(z*z+c))+((z*z+c)*(z*z+c)+(c*c+z))))

Then you use the level 3 formula and render it as a Julia Set.

Complex C (-0.2,0.0)

Meta-Mandelbrot

Complex C (-0.14 0.0)

Meta-Mandelbrot

Complex C (-0.141 0.0)

Meta-Mandelbrot

The following movie shows the complex C changing slowly from 0 to -0.2 and three zooms into Meta-Mandelbrots. Unfortunately because these are Julia sets the shapes deeper in are virtually identical to the original fractal. You don’t get those totally different looking areas as you do with Mandelbrot fractals.

For more information see the original Fractal Forums post here.

The GLSL shader to generate these fractals is now included with Visions of Chaos.

Mandelbrot Movies Remastered

In the video game industry older games get remastered all the time. Hardware power improves so older games are adapted to have better graphics and sound etc. So for a nostalgic trip into history (at least for me) it was time for some Visions of Chaos movie remasters.

After recently adding the new Custom Formula Editor into Visions of Chaos I decided to go back and re-render some sample Mandelbrot movies at 4K 60fps. Most of these Mandelbrot movie scripts go back to the earliest days of Visions of Chaos even before I first released it on the Internet. The only changes made have been to add more sub frames so they render more smoothly and last longer.

Thanks to the new formula editor using OpenGL shading language and a recent NVidia GPU all the movie parts rendered overnight. Every frame was 2×2 supsampled so the equivalent of rendering an image 4 times as large and then downsampling to increase the quality. The original movie was a 46 GB XVID encoded AVI before YouTube put it through all of its internal recoding steps.

Jason.

Custom Formula Editor for Visions of Chaos

One of the features I have wanted to implement since the earliest versions of Visions of Chaos has been a formula editor and compiler so users can experiment with their own fractal formulas. This has also been requested many times from various users over the years. Now it is finally possible.

Rather than write my own formula parser and compiler I am using the OpenGL Shading Language. GLSL gvies faster results than any compiler I could code by hand and has an existing well documented syntax. The editor is a full color syntax editor with error highlighting.

Visions of Chaos Formula Compiler

As long as your graphics card GPU and drivers support OpenGL v4 and above you are good to go. Make sure that you have your video card drivers up to date. Old drivers can lead to poor performance and/or lack of support for new OpenGL features. In the past I have had outdated drivers produce corrupted display outputs and even hang the PC running GLSL shader code. Always make sure your video drivers are up to date.

For an HD image (1920×1080 resolution) a Mandelbrot fractal zoomed in at 19,000,000,000 x magnification took 36 seconds on CPU (Intel i7-4770) vs 6 seconds on GPU (GTX 750 Ti). A 4K Mandelbrot image (3840×2160 resolution) at 12,000,000,000 x magnification took 2 minutes and 3 seconds on CPU (Intel i7-6800) and 2.5 seconds on GPU (GTX 1080). The ability to quickly render 8K res images for dual monitor 4K displays in seconds is really nice. Zooming into a Mandelbrot with minimal delays for image redraws really increases the fluidity of exploration.

So far I have included the following fractal formulas with the new Visions of Chaos. All of these sample images can be clicked to open full 4K resolution images.

Buffalo Fractal Power 2

Buffalo Fractal

Buffalo Fractal Power 3

Buffalo Fractal

Buffalo Fractal Power 4

Buffalo Fractal

Buffalo Fractal Power 5

Buffalo Fractal

Burning Ship Fractal Power 2

Burning Ship Fractal

Burning Ship Fractal

Burning Ship Fractal Power 3

Burning Ship Fractal

Burning Ship Fractal

Burning Ship Fractal Power 4

Burning Ship Fractal

Burning Ship Fractal

Burning Ship Fractal Power 5

Burning Ship Fractal

Burning Ship Fractal

Celtic Buffalo Fractal Power 4 Mandelbar

Buffalo Fractal

Celtic Buffalo Fractal Power 5 Mandelbar

Buffalo Fractal

Celtic Burning Ship Fractal Power 4

Burning Ship Fractal

Celtic Mandelbar Fractal Power 2

Celtic Mandelbar Fractal

Celtic Mandelbrot Fractal Power 2

Celtic Mandelbrot Fractal

Celtic Heart Mandelbrot Fractal Power 2

Celtic Heart Mandelbrot Fractal

Heart Mandelbrot Fractal Power 2

Heart Mandelbrot Fractal

Lyapunov Fractals

Lyapunov Fractal

Lyapunov Fractal

Lyapunov Fractal

Lyapunov Fractal

Magnetic Pendulum

Magnetic Pendulum

Mandelbar (Tricorn) Fractal Power 2

Mandelbar Fractal

Mandelbar Fractal Power 3

Mandelbar Fractal

Mandelbar Fractal Power 3 Diagonal

Mandelbar Fractal

Mandelbar Fractal Power 4

Mandelbar Fractal

Mandelbar Fractal Power 5 Horizontal

Mandelbar Fractal

Mandelbar Fractal Power 5 Vertical

Mandelbar Fractal

Mandelbrot Fractal Power 2

Mandelbrot Fractal

Mandelbrot Fractal

Mandelbrot Fractal Power 3

Mandelbrot Fractal

Mandelbrot Fractal

Mandelbrot Fractal Power 4

Mandelbrot Fractal

Mandelbrot Fractal

Mandelbrot Fractal Power 5

Mandelbrot Fractal

Mandelbrot Fractal

Partial Buffalo Fractal Power 3 Imaginary

Partial Buffalo Fractal

Partial Buffalo Fractal Power 3 Real Celtic

Partial Buffalo Fractal

Partial Buffalo Fractal Power 4 Imaginary

Partial Buffalo Fractal

Partial Burning Ship Fractal Power 3 Imageinary

Partial Burning Ship Fractal

Partial Burning Ship Fractal Power 3 Real

Partial Burning Ship Fractal

Partial Burning Ship Fractal Power 4 Imageinary

Partial Burning Ship Fractal

Partial Burning Ship Fractal Power 4 Real

Partial Burning Ship Fractal

Partial Burning Ship Fractal Power 5

Partial Burning Ship Fractal

Partial Burning Ship Fractal Power 5 Mandelbar

Partial Burning Ship Fractal

Partial Celtic Buffalo Fractal Power 4 Real

Partial Celtic Buffalo Fractal

Partial Celtic Buffalo Fractal Power 5

Partial Celtic Buffalo Fractal

Partial Celtic Burning Ship Fractal Power 4 Imaginary

Partial Celtic Burning Ship Fractal

Partial Celtic Burning Ship Fractal Power 4 Real

Partial Celtic Burning Ship Fractal

Partial Celtic Burning Ship Fractal Power 4 Real Mandelbar

Partial Celtic Burning Ship Fractal

Perpendicular Buffalo Fractal Power 2

Perpendicular Buffalo Fractal

Perpendicular Burning Ship Fractal Power 2

Perpendicular Burning Ship Fractal

Perpendicular Celtic Mandelbar Fractal Power 2

Perpendicular Celtic Mandelbar Fractal

Perpendicular Mandelbrot Fractal Power 2

Perpendicular Mandelbrot Fractal

Quasi Burning Ship Fractal Power 3

Quasi Burning Ship Fractal

Quasi Burning Ship Fractal Power 5 Hybrid

Quasi Burning Ship Fractal

Quasi Celtic Heart Mandelbrot Fractal Power 4 Real

Quasi Celtic Heart Mandelbrot Fractal

Quasi Celtic Heart Mandelbrot Fractal Power 4 False

Quasi Celtic Heart Mandelbrot Fractal

Quasi Celtic Perpendicular Mandelbrot Fractal Power 4 False

Quasi Celtic Perpendicular Mandelbrot Fractal

Quasi Celtic Perpendicular Mandelbrot Fractal Power 4 Real

Quasi Celtic Heart Mandelbrot Fractal

Quasi Heart Mandelbrot Fractal Power 3

Quasi Heart Mandelbrot Fractal

Quasi Heart Mandelbrot Fractal Power 4 Real

Quasi Heart Mandelbrot Fractal

Quasi Heart Mandelbrot Fractal Power 4 False

Quasi Heart Mandelbrot Fractal

Quasi Heart Mandelbrot Fractal Power 5

Quasi Heart Mandelbrot Fractal

Quasi Perpendicular Burning Ship Fractal Power 3

Quasi Perpendicular Burning Ship Fractal

Quasi Perpendicular Burning Ship Fractal Power 4 Real

Quasi Perpendicular Burning Ship Fractal

Quasi Perpendicular Celtic Heart Mandelbrot Fractal Power 4 Imaginary

Quasi Perpendicular Celtic Heart Mandelbrot Fractal

Quasi Perpendicular Heart Mandelbrot Fractal Power 4 Imaginary

Quasi Perpendicular Mandelbrot Fractal

Quasi Perpendicular Mandelbrot Fractal Power 4 False

Quasi Perpendicular Mandelbrot Fractal

Quasi Perpendicular Mandelbrot Fractal Power 5

Quasi Perpendicular Mandelbrot Fractal

A lot of the above formulas came from these summaries stardust4ever created.

Fractal Formulas

Fractal Formulas

Fractal Formulas

Fractal Formulas

All of these new custom fractals are fully zoomable to the limit of double precision floating point variables (around 1,000,000,000,000 magnification in Visions of Chaos). The formula compiler is fully supported for movie scripts so you can make your own movies zooming into these new fractals.

This next sample movie is 4K resolution at 60 fps. Each pixel was supersampled as the average of 4 subpixels. This took only a few hours to render. The resulting Xvid AVI was 30 GB before uploading to YouTube.

So, if you have been waiting to program your own fractal formulas in Visions of Chaos you now can. I look forward to seeing the custom fractal formulas Visions of Chaos users create. If you do not understand the OpenGL shading language you can still have fun with all the default sample fractal formulas above without doing any coding.

Jason.

Visions Of Chaos for Android updated

Visions Of Chaos for Android

It took a lot longer than I wanted, but the new Visions Of Chaos for Android v1.0 is now available for download. It is 100% free and ad free.

Visions Of Chaos for Android

The main new feature is support for running OpenGL ES shaders on your Android device. There are over 1000 sample shaders included with the app.

Visions Of Chaos for Android

Visions Of Chaos for Android

So, if you own one of the 85% market share Android devices download the app from the Visions Of Chaos for Android web page or directly from Google Play now.

Jason.