Welcome to Fractal Forums

Fractal Software => Mandelbulb 3d => Topic started by: DarkBeam on September 19, 2011, 05:16:54 PM




Title: A "smooth" transition ...
Post by: DarkBeam on September 19, 2011, 05:16:54 PM
 ;D ;D ;D with my new fmla "Partly Julia on radius"

Mandelbulb3Dv17{
R.....S....O/...w....2...............1.......s1E................................
................................OaNaNaNadz1........A./..................y.2.....
................/M.0/....6.d....i.....E2.....QzIXLua2PrD/..........m/dkpXm1....U
z.....kD12../..........wz..................................u1....y1...sD...../..
.w1...sDYsAIxzzzjz1..........UAbUdisqcljMaO9c9iBOw1v41auWPX4zU2bVezzzzyDIJIzUvMS
3t17C1JzzzzvzOCphUisqclD......o1..............kD.2....sD.2kz....................
.............oAnAr1...........JRW4.wp7O.EObc/.nRW4.or7O.kVbc/.FSW4..............
..................kz.wzzz1.U..6.P....M4...EB....W....k1....F....8/...I1....UJl42
...U.qFG9yzb2zzzRYoWzz7lz16.mc..zXCc.El18XGQeGyDjvIRhrVAkz1..........2.28.kFrA0.
FWb96aAIVzvh1se7Umvxz0........../6U0.wzzz1................................E.0c..
zzzz.................................2U.8.kzzzD.................................
/6U0.wzzz1...................................2CcN/UvNP6.eeWCNq0.yRii.EJJUk1f..XR
S1.mx3CcN/UvNP6.QsLsUa3.ibhV..bTV1OK.sSq40.ly3CcN/UvNP6.MwLsUa3.ibhV.kqTV1OK.sSq
40.kz3CcN/UvNP6...EsUa3.eeWCNq0.IJ36wk8.wyLsUa3.................................
E....6....E.....I....c....kLE3aQolKS8J5Pd3aI....................................
0.......................................kz9........yzAnAnAnAnAxD..........kAnAnA
nAnszcNaNaNaNaxj........kz1.....................................................
.....................2..........0....YYPoJqNZ756ExqRZ75.........................
8.............................0E........kz9.....................................
................................................................................
................................}


Title: Re: A "smooth" transition ...
Post by: DarkBeam on September 19, 2011, 05:24:13 PM
Another sample;
(note the strange transition zone!!!)

Mandelbulb3Dv17{
R.....S....O/...w....2....E/KqYYNROA.biyZzNhBY4E9N42gFOFdwPI8zmhUgl/.TvKkEnUNvzj
................................T6fbNzPGEz1........Y./..................y.2.....
................/M.0/....6Ew....P0....E2.....2pMNlXOY5tD/..........m/dkpXm1....U
z.....kD12../..........wz..................................u1....y1...sD...../..
.w1...sDjSGquc4tFy1..........El5GYIXEpfjuAUKLnkiouf40OIV7oIWz2M3rhGJCZsjcOGjZoTi
ou1d4ON9JtIWzUA9bAM0BZsD......Y1..............kD.2....sD.2kz....................
.............oAnAr1...........JRW4.wp7O.EObc/.nRW4.or7O.kVbc/.FSW4..............
..................kz.wzzz1.U..6.P....M4...EB....W....k1....F....8/...I1....UJl42
...U.qFG9yzb2zzzRYoWzz7lz16.mc..zXCc.El18XGQeGyDjvIRhrVAkz1..........2.28.kFrA0.
FWb96aAIVzvh1se7Umvxz0........../6U0.wzzz1................................E.0c..
zzzz.................................2U.8.kzzzD.................................
/6U0.wzzz1...................................2CcN/UvNP6.eeWCNq0.yRii.EJJUk1f..XR
S1.mx3CcN/UvNP6.QsLsUa3.ibhV..bTV1OK.sSq40.ly3CcN/UvNP6.MwLsUa3.ibhV.kqTV1OK.sSq
40.kz3CcN/UvNP6...EsUa3.eeWCNq0.IJ36wk8.wyLsUa3.................................
E....6....E.....I....c....kLE3aQolKS8J5Pd3aI....................................
0.......................................6.A........6.BnAnAnAnAyD................
...0./........0k........kz1.....................................................
.....................2...../....1....2IPVdLOiR460x4S.65.........................
.Qk0...........................E........Uz1........wz...........................
................................................................................
................................}



Title: Re: A "smooth" transition ...
Post by: knighty on September 19, 2011, 08:22:58 PM
Very nice finding.
Have you tried other (potentially arbitrary) functions for blending mandel and julia c values?


Title: Re: A "smooth" transition ...
Post by: DarkBeam on September 19, 2011, 09:25:52 PM
Any function is good. Two requisites are necessary btw

f must be f(x,y,z) or at least of a subset of 3d space
max(f) must be 1, while min(f) must be 0
possibly in big areas f should be uniformly 0 or 1 because transition areas look a bit weird

that's all... :)

The procedure itself is coded in the m3f file, open it to see


Title: Re: A "smooth" transition ...
Post by: Jesse on September 19, 2011, 11:28:55 PM
Looks cool, interpolating between those vals is of course a good idea.

In my formula i let those offsets of the julia vals stay between pixel coordinates and adding constants, so your formula always interpolates correct between julia and the real non-julia version, mine avoids to much stretched regions.

However, interpolating based on the position might have some good potential for more  :)

(and thx for the formula!)


Title: Re: A "smooth" transition ...
Post by: DarkBeam on September 20, 2011, 05:38:10 PM
Okay, as I corrected some details in the formula also the params are now okay. PLEASE download again the formula! Now it is much more useful & powerful.

the source code (for knighty & friends? :dink: )

Code:
(x' is x - xCenter etc)
R = sqrt(x'*x'+y'*y'+z'*z')/Rmax;
if inside==1 {
// simple mode, out Mandel and in Julia.
if R < 1 {
  R -= Speed
  if R > 0 {      // Transition
    // never get here if R==0 or you get in trouble!...
    R /= (1-Speed);
    Cx = (1-R) * Sx + R * Cx;
    Cy = (1-R) * Sy + R * Cy;
    Cz = (1-R) * Sz + R * Cz;
    rc = rec*(1-R);
    x -= rc*xC;
    y -= rc*yC;
    z -= rc*zC;
  } else {      // inside must be Julia
    rc = rec;
    Cx = Sx;    Cy = Sy;    Cz = Sz;
    x -= rc*xC; y -= rc*yC; z -= rc*zC; // implemented with a GOTO
}}  // outside is left untouched
} else {
// alternate mode, out Julia and in Mandel. Longer formula
if R < 1 {
  R -= Speed
  if R > 0 {      // Transition
    // never get here if R==0 or you get in trouble!...
    R /= (1-Speed);
    Cx = (1-R) * (Cx-rec*xC) + R * Sx;
    Cy = (1-R) * (Cy-rec*yC) + R * Sy;
    Cz = (1-R) * (Cz-rec*zC) + R * Sz;
    rc = rec*(1-R); // implemented with a GOTO
    x -= rc*xC;
    y -= rc*yC;
    z -= rc*zC;
  } else {      // inside must be shifted Mset
    Cx = Cx-rec*xC;
    Cy = Cy-rec*yC;
    Cz = Cz-rec*zC;
    rc = rec; // implemented with a GOTO
    x -= rc*xC; y -= rc*yC; z -= rc*zC;
}} else {   // (R>=1 is outside)
  // outside must be unshifted Julia with given seed!
  Cx = Sx;
  Cy = Sy;
  Cz = Sz;
}

} // end



Title: Re: A "smooth" transition ...
Post by: DarkBeam on September 20, 2011, 05:44:11 PM
Test param with new recenter feature; an Abox with a big hole and a Julia surprise O0 :tease:


Code:
Mandelbulb3Dv17{
R.....S....O/...w....2.....Pzvsb0nQA.jW9bwmE1l4EH9Zzy7GytzvWNGiOWJtjzG9SoM1Bjw.k
................................gAY93cAPGz1........Y./..................y.2.....
................/M.0/....6.V/...O0....E2.....6utp4VMWysD/..........m/dkpXm1....U
z.UaNadD12../..........wz..................................u1....y1...sD...../..
.w1...sDwCv1HZRL4y1/i1SdJAZgyGsd78czSNsjM41QRifCZr9DEuk1W7uXzkhkwEUAebfjlYTO2ujL
4y1/i1SdJAZgyMLGj2JqRNsD......Y2..............kD.2....sD.2kz0...................
.............oAnAr1...........JRW4.wp7O.EObc/.nRW4.or7O.kVbc/.FSW4..............
..................kz.wzzz1.U..6.P....M4...EB....W....k1....F....8/...I1....UJl42
...U.qFG9yzb2zzzRYoWzz7lz16.mc..zXCc.El18XGQeGyDjvIRhrVAkz1..........2.28.kFrA0.
FWb96aAIVzvh1se7Umvxz0........../6U0.wzzz1................................E.0c..
zzzz.................................2U.8.kzzzD.................................
/6U0.wzzz1...................................2CcN/UvNP6.eeWCNq0.yRii.EJJUk1f..XR
S1.mx3CcN/UvNP6.QsLsUa3.ibhV..bTV1OK.sSq40.ly3CcN/UvNP6.MwLsUa3.ibhV.kqTV1OK.sSq
40.kz3CcN/UvNP6...EsUa3.eeWCNq0.IJ36wk8.wyLsUa3.................................
E....6....E.....I....c....kLE3aQolKS8J5Pd3aI....................................
0.......................................6.A........6.dNaNaNaNayD................
...0.1........0E........kz1........wz0..........................................
.....................2...../....1....2IPVdLOiR460x4S.65.........................
.Qk0...........................E........Uz1........wz...........................
................................................................................
................................}


Title: Re: A "smooth" transition ...
Post by: Jesse on September 20, 2011, 06:07:41 PM
You are to fast for me  :dink:  ...

My gif example was not really good, did not recenter the bulb, the whole formula i used is:

  xt = Px - X_sphere
  yt = Py - Y_sphere
  zt = Pz - Z_sphere
  r = Sqrt(Sqr(xt) + Sqr(yt) + Sqr(zt)) - Radius
  if r > 0 {
    m = r / (r + Radius)
    Cx = Cx + xt * m
    Cy = Cy + yt * m
    Cz = Cz + zt * m
  }

With julia mode turned on.

But if julia turned off some weird boxes are also possible (have not the time to make better discoveries yet):
(ps: the interpolation trick would be also very nice to make a 'SmoothBulbox' formula to get rid of the discontinuities)



Title: Re: A "smooth" transition ...
Post by: DarkBeam on September 20, 2011, 08:45:56 PM
Don't mix all ... My formula works with jmode off only ;)

And I don't understand what is your last image, what is? :D


Title: Re: A "smooth" transition ...
Post by: knighty on September 20, 2011, 09:50:19 PM
the source code (for knighty & friends? :dink: )
Thank you!  ;D
It's amazing that the distance estimation works very well. What about using an arbitrary function as seed value (C=F(x,y,z)) even a fractal one (C=Fn(x,y,z))?  :crazy:


Title: Re: A "smooth" transition ...
Post by: DarkBeam on September 20, 2011, 10:09:05 PM
Well until now in Mandelbulb de worked very well...

Try to replace R expression with

R=max(x,y,z)

to obtain a cubic slice (well, I think that it works :D not tried for now!)

I explained that you must force F to belong to the Closed interval [0,1]. and I think that very strange funcs may not work that well... because fractals exist in relatively small space regions. well but it may be funny to see a menger sponge fusion heheh ;D


Title: Re: A "smooth" transition ...
Post by: DarkBeam on September 20, 2011, 10:17:31 PM
Reading again your question... Actually it is possible!

fmla 1. menger, 30 iters.
fmla 2. flip c-xyz
fmla 3. (check repeat from here!) Anything ya like... :D

Have fun!


Title: Re: A "smooth" transition ...
Post by: Jesse on September 20, 2011, 10:32:36 PM
Don't mix all ... My formula works with jmode off only ;)

Yep, it was only related to my simple formula.
Sorry for my ignorance, i thought this thread was a follow-up from the custom formulas thing (or wherever the part(l)yjulia thread started).
 :dink:

To turn partly the Julia on is of course ok too, would make even more sense if you would not have the pixelpos.

Quote
And I don't understand what is your last image, what is? :D

A -1.5 Box with my simple formula as pretransform, dont have the exact parameters here.. can tell tomorrow


Title: Re: A "smooth" transition ...
Post by: DarkBeam on September 20, 2011, 11:14:24 PM
Was also wondering what are the symbols you used instead of ebx ecx edx, but I have never seen those before :( I am so ignorant ;)

I meant... Somebody may be confused if we use different styles :D

Anyway. I prefer to use old style (ecx edx ebx) 'cause it allows edventually to combine more than one pretransform with ease


Title: Re: A "smooth" transition ...
Post by: Jesse on September 21, 2011, 12:03:01 AM
Was also wondering what are the symbols you used instead of ebx ecx edx, but I have never seen those before :( I am so ignorant ;)

I meant... Somebody may be confused if we use different styles :D

Are we?  Don't think so  :hmh:

Guess Z -> Sqr(Z) + C is well known, so i use Cx, Cy, Cz for C and instead of Zx, Zy and Zz i use x,y,z(,w) directly.
Where C can be the pixelpos to be calculated or the Julia seed if in julia mode.
If i want to use explicitly the pixelpos, i use Px, Py and Pz instead.

All other temporary variables are more or less freely choosen, but the above ones i try to use consistently.


Quote
Anyway. I prefer to use old style (ecx edx ebx) 'cause it allows edventually to combine more than one pretransform with ease

I think even i would be confused with this style, maybe if we share some secrets  :dink:


Title: Re: A "smooth" transition ...
Post by: DarkBeam on September 21, 2011, 11:27:16 AM
 ;D ;D ;D Changing the radius function is an incredibly powerful idea!

Code:
R = sqrt(x'*x'+y'*y'+z'*z')/Rmax; // Euclidean metric (sphere)
// Cubic metric (not euclidean but funny);
// x' = abs(x'); y' = abs(y'); z' = abs(z');
// R = max(x',y',z')/Rmax;
// Biconical metric;
// R = sqrt((x'*x'+y'*y')/(z'*z'))/Rmax; <- rmax controls the pendence
// Cylindrical metric;
// R = sqrt(x'*x'+y'*y')/Rmax;


Title: Re: A "smooth" transition ...
Post by: Jesse on September 21, 2011, 01:09:37 PM
Was also wondering what are the symbols you used..

My formula was faulty, maybe this was leading to some confusion... must use the pixel coords Pxyz instead of Cxyz, have corrected it!

Also updated the additional formulas i made with the '_PartlyJuliaRoff' formula.

ps: the paras for the box were: SphereXYZ: [0, -0.4, 1] and radius = -0.2

pps: sorry for hijacking this thread a bit, i keep shut now  :dink:


Title: Re: A "smooth" transition ...
Post by: DarkBeam on September 21, 2011, 04:14:27 PM
Oh no, please hijack it as much as you can! ;D (Don't exactly know why whenever one says something it's considered "hijack" :-\ ) :D


Title: Re: A "smooth" transition ...
Post by: DarkBeam on September 24, 2011, 12:59:22 PM
Okay; I'm self-hijacking my thread! :evil1: :evil1: :D

Test image(s) of Wavy ABox... :angel1:


Title: Re: A "smooth" transition ...
Post by: DarkBeam on September 28, 2011, 04:41:27 PM
Some sample images from my latest fmla;

http://lucagn.deviantart.com/art/Gotham-City-260458688
http://lucagn.deviantart.com/art/The-fractal-viking-fleet-260455729
http://lucagn.deviantart.com/art/Big-hall-of-triumph-260454770

 ;D

Take a look and get inspired