Logo by AGUS - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Check out the originating "3d Mandelbulb" thread here
 
*
Welcome, Guest. Please login or register. April 25, 2024, 10:57:18 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: 1 [2] 3   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Perturbation formula for burning ship (hopefully correct :P)  (Read 4729 times)
0 Members and 1 Guest are viewing this topic.
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #15 on: September 17, 2014, 12:35:57 PM »

If so, then why does the quadratic BS work? nerd
Because of laser blaster's excellent if-conditions, which I don't even fully understand

(because my expertise is not to create the fastest most optimized or the most beautiful easy-to-understand code. My expertise is to very quickly implement an idea, often someone else's, into a working program and that is also what I do for a living smiley )
Logged

Want to create DEEP Mandelbrot fractals 100 times faster than the commercial programs, for FREE? One hour or one minute? Three months or one day? Try Kalles Fraktaler http://www.chillheimer.de/kallesfraktaler
http://www.facebook.com/kallesfraktaler
laser blaster
Iterator
*
Posts: 178


« Reply #16 on: October 01, 2014, 09:45:27 PM »

That abs operation makes a very big difference between the mandelbrot set and the burning ship. This addition makes the burning ship non-analytical. If I got it right, this should mean that the perturbation thing should NOT work on the bs fractal. But somehow it does. Perhaps the reason is what you just wrote.
Perturbation theory isn't limited to analytic functions.It's much more convenient to work out for analytic functions, as you can use complex arithmetic for those, and you can operate on complex numbers the same way as you do for reals. However, when you have a non-analytic function, the complex numbers no longer apply, and you have to treat it as a function of two real variables, which means more work.

The abs() folding makes it even trickier to get accurate results. This is because you can't easily make the large terms cancel: How can you simplify abs(a+c) - abs(a) to an expression involving c only? Well, you can't. However, under certain conditions, the function can be expressed entirely without abs. For example, if c and a are both greater than 0, then abs(a+c) = a+c and abs(a) = a. In this way, by analyzing the function case-by-case, you can simplify and make the large terms cancel for most cases. However, there are still some cases where you can't cancel the large terms. But it just so happens that in all such cases, the delta term (the perturbed orbit) is larger than any of the terms from the reference orbit(which are usually larger),  and the two terms have opposite signs, so adding in the typically "large" term from the reference orbit actually brings the sum closer to zero, so no precision is lost.

I'm looking into deriving the cubic perturbation formula. I've made some progress, but I'm not yet sure if it'll all work out. On the other hand, for powers that are powers of two (2,4,8,etc), deriving the perturbation formula should be trivial.
Logged
stardust4ever
Fractal Bachius
*
Posts: 513



« Reply #17 on: October 01, 2014, 10:41:03 PM »

Sweet. So you have to apply a bunch of conditional logic (If Then, etc...) to a variety of formula variants in order make each abs() function work? Sounds complicated.

For Quadratic Burning Ship,

*Burning ship:

Code:
		zi = abs(zr * zi) * -2.0 + JuliaI;
zr = zrsqr - zisqr + JuliaR;
zisqr = zi * zi;
zrsqr = zr * zr;

You can apply the abs() function to Zi0 and Zr0 individually prior to iteration, or apply the abs() function once to (zr*zi) because the result will be identical either way.

For Cubic Burning Ship,

Code:
		zi = ((zrsqr * 3.0) - zisqr) * abs(zi) + JuliaI;
zr = (zrsqr - (zisqr * 3.0)) * abs(zr) + JuliaR;
zisqr = zi * zi;
zrsqr = zr * zr;

applying the abs() to just zi1 will not work and result in an erroneous fractal. Applying the abs() to zr0 and zi0 respectively prior to the equation is the same net effect as applying the abs() to zi and zr sides of the equation individually. This is again due to the fact that X^2 is always positive.

If applying the perturbation formula to the cubic fractal requires two abs() commands instead of one as with the quadratic, then there are four conditional equations to be selected based on signage, as opposed to two with the burning ship. I guess that does complicate things a bit, but it should make the fractal impossible to calculate.

Thanks for the effort in working on this! afro
Logged
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #18 on: October 02, 2014, 11:54:06 AM »

I'm looking into deriving the cubic perturbation formula. I've made some progress, but I'm not yet sure if it'll all work out. On the other hand, for powers that are powers of two (2,4,8,etc), deriving the perturbation formula should be trivial.

That sounds really exiting. I keep my fingers crossed praying
Logged

Want to create DEEP Mandelbrot fractals 100 times faster than the commercial programs, for FREE? One hour or one minute? Three months or one day? Try Kalles Fraktaler http://www.chillheimer.de/kallesfraktaler
http://www.facebook.com/kallesfraktaler
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #19 on: October 02, 2014, 09:38:41 PM »

With stardust4ever's formula, together with laser blaster's if-conditions, the cubic burning ship is actually as "easy" as the ordinary burning ship.

Sometimes, it is enough encouraging just to read that someone writes it is possible. So when laser blaster says it's possible, I believed it.

But I don't think I have the time to make a it available in KF for you all until next week, unfortunately...


* cbs.png (152.07 KB, 353x262 - viewed 391 times.)
« Last Edit: October 02, 2014, 10:18:02 PM by Kalles Fraktaler » Logged

Want to create DEEP Mandelbrot fractals 100 times faster than the commercial programs, for FREE? One hour or one minute? Three months or one day? Try Kalles Fraktaler http://www.chillheimer.de/kallesfraktaler
http://www.facebook.com/kallesfraktaler
stardust4ever
Fractal Bachius
*
Posts: 513



« Reply #20 on: October 03, 2014, 01:55:21 AM »

With stardust4ever's formula, together with laser blaster's if-conditions, the cubic burning ship is actually as "easy" as the ordinary burning ship.

Sometimes, it is enough encouraging just to read that someone writes it is possible. So when laser blaster says it's possible, I believed it.

But I don't think I have the time to make a it available in KF for you all until next week, unfortunately...


 Cantor Dance

 afro afro afro
Logged
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #21 on: October 03, 2014, 05:39:41 PM »

<a href="https://www.youtube.com/v/_rL6pI8-ftU&rel=1&fs=1&hd=1" target="_blank">https://www.youtube.com/v/_rL6pI8-ftU&rel=1&fs=1&hd=1</a>
Logged

Want to create DEEP Mandelbrot fractals 100 times faster than the commercial programs, for FREE? One hour or one minute? Three months or one day? Try Kalles Fraktaler http://www.chillheimer.de/kallesfraktaler
http://www.facebook.com/kallesfraktaler
stardust4ever
Fractal Bachius
*
Posts: 513



« Reply #22 on: October 03, 2014, 09:23:46 PM »

Quote
Thanks to stardust4ever and laser blaster for your contributions on the Cubic Burning Ship rendering with Perturbation!
No, thank you! Awesome, awesome video btw...
 thanks sign champagne toast A Beer Cup A Beer Cup A Beer Cup
Logged
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #23 on: October 06, 2014, 11:58:26 AM »

Thanks

Don't forget to check out Kalles Fraktaler 2.7 smiley

BTW stardust, do you have a formula for cubic celtic, in the same easily accessible way as you have provided the others here in this thread?

I had a flow yesterday evening and implemented 4 formulas without a single failure. Only the cubic celtic is missing wink
Logged

Want to create DEEP Mandelbrot fractals 100 times faster than the commercial programs, for FREE? One hour or one minute? Three months or one day? Try Kalles Fraktaler http://www.chillheimer.de/kallesfraktaler
http://www.facebook.com/kallesfraktaler
stardust4ever
Fractal Bachius
*
Posts: 513



« Reply #24 on: October 07, 2014, 06:56:03 AM »

Thanks

Don't forget to check out Kalles Fraktaler 2.7 smiley

BTW stardust, do you have a formula for cubic celtic, in the same easily accessible way as you have provided the others here in this thread?
<Quoted Image Removed>
I had a flow yesterday evening and implemented 4 formulas without a single failure. Only the cubic celtic is missing wink
Expect a PM shortly.

I am working on a database of fractal formulas of base 2 and 3 that add abs() formulas to the fractal, as well as negating the imaginary side. I took a break for a bit due to recent surgery but I am recovered and at home now. I have cataloged a total of 12 fractals in second power and am now working on 3rd power.

In the second power fractal, I found 8 unique symmetrical fractals and 8 chiral pairs of asymmetric fractals. Because I don't count mirrors or rotations, that makes 12 unique second order formula. These fractals were fabricated by applying the abs() function to certain key components of the equation, or not, and optionally sign-changing the imaginary part of the equation. Applying a sign change to the real portion always produces a duplicate of one of the other fractals, with the needle pointing East instead of West, so that eliminates most of the duplicates.

The way I plan on slitting the 3rd order equation, will result in 64 distinct combinations, however many of them will also be rotations or mirrors.

I will eventually publish both lists, but for the time being, I can send you a copy of the 2nd order list (with footnotes) and some of the entries discovered so far in the 3rd.

As for deep fractal zooming of the cubic variety, the Cubic Burning Ship and the Cubic Buffalo (plus a new 3rd order hybrid Burning Ship/ Buffalo I discovered which takes the imaginary portion of one and the real portion of the other) seem to be the most promising.
Logged
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #25 on: October 07, 2014, 03:46:10 PM »

I found out that the Cubic Buffalo may not be possible to render with perturbation on certain circumstances.
Locations very close to - but not on - the x-axis are not rendered correctly. Different references create different views - however good looking and not the ordinary pixelated glitches that normally occur due to too low precision. Instead, the detected glitches are filled with incorrect pattern, and if I put the main reference somewhere else the view is not the same.
Any help is much appreciated, even though I understand it is very difficult...
Example:
Code:
Re: -1.4126243632321452726956109605177719479134162989454861414136277757243720542915607109720395
Im: -0.0000000000000000000000000000000000000000000000000000000000000000000387125791691989701978
Zoom: 2.42833611528E83
Iterations: 12312

Here is my calculations, from stardust4ever's easily accessible formula:
x-axis:
zr = abs((zrsqr - (zisqr * 3.0)) * zr) + JuliaR;
abs((x*x - (y*y * 3.0)) * x) + x0  -  abs((r*r - (i*i * 3.0)) * r) - r0;
abs(((r+a)*(r+a) - (y*y * 3.0)) * (r+a)) + a0 - abs((r*r - (i*i * 3.0)) * r);
abs( (r*r + 2*r*a + a*a - 3*i*i - 6*i*b - 3*b*b) * (r+a) ) - abs(r*r*r - 3*r*i*i) + a0;
abs( r*r*r-3*r*i*i + 2*r*r*a + r*a*a - 6*r*i*b - 3*r*b*b + r*r*a + 2*r*a*a + a*a*a - 3*i*i*a - 6*i*b*a - 3*b*b*a ) - abs(r*r*r-3*r*i*i) + a0;
abs( r*r*r-3*r*i*i + 3*r*r*a + 3*r*a*a - 6*r*i*b - 3*r*b*b + a*a*a - 3*i*i*a - 6*i*b*a - 3*b*b*a ) - abs(r*r*r-3*r*i*i) + a0;

The resulting values to laster blaster's magic abs-condition are
c = r*(r2-3*i2);
d = a*(3*r2 + a2) + 3*r*(a2 - 2*i*b - b2) - 3*a*(i2 + 2*i*b + b2);

y-axis:
zi = abs(((zrsqr * 3.0) - zisqr) * zi) + JuliaI;
abs(((x*x * 3.0) - y*y) * y) + y0 - abs(((r*r * 3.0) - i*i) * i) - i0;
abs((3*r*r + 6*r*a + 3*a*a - i*i - 2*i*b - b*b) * (i+b)) + b0 - abs(3*r*r*i - i*i*i);
abs(3*r*r*i-i*i*i + 6*r*a*i + 3*a*a*i - 3*i*i*b - 3*i*b*b + 3*r*r*b + 6*r*a*b + 3*a*a*b - b*b*b) + b0 - abs(3*r*r*i-i*i*i);

And the resulting values to the magic abs-condition are:
c = i*(3*r2-i2);
d = 3*i*(2*r*a + a2 - b2) + 3*b*(r2 + 2*r*a + a2) - b*(3*i2 + b2);
Logged

Want to create DEEP Mandelbrot fractals 100 times faster than the commercial programs, for FREE? One hour or one minute? Three months or one day? Try Kalles Fraktaler http://www.chillheimer.de/kallesfraktaler
http://www.facebook.com/kallesfraktaler
youhn
Fractal Molossus
**
Posts: 696


Shapes only exists in our heads.


« Reply #26 on: October 07, 2014, 09:02:17 PM »

Hey Kalles, thanks for the new types! Since today I'm exploring the Celtic type. Already a nice image (just a little after touch with the Gimp):


Source: http://jeroensnake.deviantart.com/art/Celtic-Curls-on-the-horizon-487011826

Expect zoom videos the next few weeks!

smiley lineup
Logged
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #27 on: October 07, 2014, 09:49:25 PM »

Excellent, thanks!
Logged

Want to create DEEP Mandelbrot fractals 100 times faster than the commercial programs, for FREE? One hour or one minute? Three months or one day? Try Kalles Fraktaler http://www.chillheimer.de/kallesfraktaler
http://www.facebook.com/kallesfraktaler
stardust4ever
Fractal Bachius
*
Posts: 513



« Reply #28 on: October 08, 2014, 01:26:45 AM »

I found out that the Cubic Buffalo may not be possible to render with perturbation on certain circumstances.
Locations very close to - but not on - the x-axis are not rendered correctly. Different references create different views - however good looking and not the ordinary pixelated glitches that normally occur due to too low precision. Instead, the detected glitches are filled with incorrect pattern, and if I put the main reference somewhere else the view is not the same.
Any help is much appreciated, even though I understand it is very difficult...
Example:
Code:
Re: -1.4126243632321452726956109605177719479134162989454861414136277757243720542915607109720395
Im: -0.0000000000000000000000000000000000000000000000000000000000000000000387125791691989701978
Zoom: 2.42833611528E83
Iterations: 12312

Here is my calculations, from stardust4ever's easily accessible formula:
x-axis:
zr = abs((zrsqr - (zisqr * 3.0)) * zr) + JuliaR;
abs((x*x - (y*y * 3.0)) * x) + x0  -  abs((r*r - (i*i * 3.0)) * r) - r0;
abs(((r+a)*(r+a) - (y*y * 3.0)) * (r+a)) + a0 - abs((r*r - (i*i * 3.0)) * r);
abs( (r*r + 2*r*a + a*a - 3*i*i - 6*i*b - 3*b*b) * (r+a) ) - abs(r*r*r - 3*r*i*i) + a0;
abs( r*r*r-3*r*i*i + 2*r*r*a + r*a*a - 6*r*i*b - 3*r*b*b + r*r*a + 2*r*a*a + a*a*a - 3*i*i*a - 6*i*b*a - 3*b*b*a ) - abs(r*r*r-3*r*i*i) + a0;
abs( r*r*r-3*r*i*i + 3*r*r*a + 3*r*a*a - 6*r*i*b - 3*r*b*b + a*a*a - 3*i*i*a - 6*i*b*a - 3*b*b*a ) - abs(r*r*r-3*r*i*i) + a0;

The resulting values to laster blaster's magic abs-condition are
c = r*(r2-3*i2);
d = a*(3*r2 + a2) + 3*r*(a2 - 2*i*b - b2) - 3*a*(i2 + 2*i*b + b2);

y-axis:
zi = abs(((zrsqr * 3.0) - zisqr) * zi) + JuliaI;
abs(((x*x * 3.0) - y*y) * y) + y0 - abs(((r*r * 3.0) - i*i) * i) - i0;
abs((3*r*r + 6*r*a + 3*a*a - i*i - 2*i*b - b*b) * (i+b)) + b0 - abs(3*r*r*i - i*i*i);
abs(3*r*r*i-i*i*i + 6*r*a*i + 3*a*a*i - 3*i*i*b - 3*i*b*b + 3*r*r*b + 6*r*a*b + 3*a*a*b - b*b*b) + b0 - abs(3*r*r*i-i*i*i);

And the resulting values to the magic abs-condition are:
c = i*(3*r2-i2);
d = 3*i*(2*r*a + a2 - b2) + 3*b*(r2 + 2*r*a + a2) - b*(3*i2 + b2);
Reposting here, because it needs to be repeated:

This is awesome news; thank you so much!!!

Here are the ABS fractal formulas I have cataloged so far. The 2nd order fractal formulas (set of 12 formulas) are complete:

http://sta.sh/0ag7nkkbjri

3rd order has a long way to go (bigger superset but lots of duplicates and "junk") but here are some of the more interesting fractals I've discovered so far.

http://sta.sh/0263mwwvgaxn

Click the download link for full size view (1920x1920). Floating point code for each fractal has been embedded in the image.

I thought I ought to make the formulas public so that other people can play with them! Also I don't quite have the programming skills to incorporate them into functional plugins... :wink:
Logged
therror
Explorer
****
Posts: 42


« Reply #29 on: September 13, 2017, 08:11:46 AM »

Hi! I have implemented perturbation for Perpendicular burning ship for GPGPU.  Initially I take the code from Kalles Fraktaler without changing (as it possible):
Code:
do
    {
      FLOAT r=p=xref[n].p;
      FLOAT i=q=xref[n++].q;
      yp=p+dnr;
      yq=q+dni;
      FLOAT a = dnr;
      FLOAT b = dni;
      FLOAT a2 = a*a;
      FLOAT b2 = b*b;
      FLOAT a0 = d0r;
      FLOAT b0 = d0i;
      dtr = TWO *r*a + a2 - b2 - TWO*b*i + a0;
      FLOAT c = i;
      FLOAT d = b;
      if (c>0)
      {
        if (c + d>0)
          dti = d;
        else if (d == -c)
          dti = d;
        else if (d<-c)
          dti = -d - TWO *c;
      }
      else if (c == 0)
        dti = ABS (d);
      else if (c < 0)
      {
        if (c + d>0)
          dti = d + TWO *c;
        else if (d == -c)
          dti = -d;
        else if (d < -c)
          dti = -d;
      }
      dti = b0 - dti*r* TWO - TWO* a* ABS ((i + b));/*приоритет?*/
      dnr=dtr;
      dni=dti;
    }
    while (yp*yp+yq*yq<BAILOUT&&n<nmax);
But I was surprised...
Why such constructions
Code:
        if (c + d>0)
          dti = d;
        else if (d == -c)
          dti = d;
and multiple copies the same numbers...  I understand that Kalles Fraktaler's author is very good programmer and maybe I don't know some important things. I have done some algebraic reconstructions and write this:
Code:
do
    {
      p=xref[n].p;
      q=xref[n++].q;
      yp=p+dnr;
      yq=q+dni;
      if (q>0)
      {
        if (dni<-q)
          dti=-dni-TWO*q;
        else
          dti=dni;
      }
      else/* if (q<0)*/
      {
        if (dni>-q)
          dti=dni+TWO*q;
        else
          dti=-dni;
      }
      /*else dti=ABS (dni);*/
      dti=d0i-TWO*(dti*p+dnr*ABS (q+dni));
      dnr=TWO*(p*dnr-q*dni)+dnr*dnr-dni*dni+d0r;
      dni=dti;
    }
    while (yp*yp+yq*yq<BAILOUT&&n<nmax);
The pictures absolutely identical. New code 3x faster (1551 seconds against 4620).
Logged
Pages: 1 [2] 3   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Burning Ship Mutatorkammer Gallery cKleinhuis 2 5836 Last post March 21, 2008, 05:22:42 PM
by GFWorld
3D burning ship Mandelbulb3D Gallery bib 0 4795 Last post November 02, 2010, 09:34:27 PM
by bib
Distance Estimation formula for the Burning Ship? Programming laser blaster 4 6001 Last post April 20, 2014, 05:45:28 PM
by top-quark
Burning Ship with Perturbation Movies Showcase (Rate My Movie) Kalles Fraktaler 1 1025 Last post May 23, 2014, 06:07:35 PM
by ellarien
3D Burning Ship formula and .frag file Fragmentarium laser blaster 7 4651 Last post March 01, 2015, 07:15:02 PM
by Crist-JRoger

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.38 seconds with 24 queries. (Pretty URLs adds 0.014s, 2q)