Logo by Kaliyuga - 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: Did you know ? you can use LaTex inside Postings on fractalforums.com!
 
*
Welcome, Guest. Please login or register. December 16, 2018, 08:17:17 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]   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: Elazobulb  (Read 447 times)
0 Members and 1 Guest are viewing this topic.
Alef
Fractal Supremo
*****
Posts: 1174



WWW
« on: September 13, 2017, 03:28:37 PM »

The introduction. I think this (JIT, Mandelbulb3D) formula is wort some mention.
In http://gannjondal.deviantart.com page there are tutorials about writing formulas in JIT. And there were quite a lot of formulas. Most of them were, well ... , author says it is just a start for your formula exploration. However among this ... there were the pearl - JIT_gnj_TwoRealPower_02.m3f

It does a calculation:

z1=Mandelbulb(z, power)
z2=Mandelbulb(z, power2)

Then:

z= interpolation (z1,z2)
z=z+c.

It gets interesting when one power is positive another is negative like 7, -7 or 8, -3, or 4, -4 . Then mandelbulb is not usual solid but with holes and like made from vines. Maybe this could be expanded to 2D mandelbrot sets too. I hadn't tested that.

I used interpolation with just one variable like on ruler with 0 and 1 and extrapolation. Originaly there were a weighted sum. Realy it is the same just it uses two variables.


I wanted aslou to make a Lp space mandelbulb so to this I added the possibility to calculate radius in Lp spaces with different "p"s in each axis.
radius = p root of (|x|^p + |y|^p + |z|^p)
There is a question what then to use for the p root. Geometric mean seems to be the best throught I'm not shure about mathematical side of that.

There is a lot of slow functions. So with it I added lot of internal conditionals to awoyd these if they aren't needed and don't calculate other bulbs if powers are equal. And alowed only the integer values for "p"s.

Of corse p=1 "taxicab" mandelbulb is the fastest.
radius= (abs(z) abs(y) + abs(z))
p= 1 mandelbulbs looks good only when the power reaches high value like 40. Then it reminds mayan pyramid. Else it is ugly. Of corse p=30 mandelbulb is a box.

The diferent "p"s allows to stretch fractal. "p"s= 2,2,3 eliminates strange thing on mandelbulbs poles. Throught certain combinations of values destroys any meaningfull mandelbulb shape. If "p"s are different allways some spherical solids appears inside of m-bulb. Maybe becouse it isn't mathematicaly rigid.


Code:
[OPTIONS]
.DEScale = 0.9
.SIPow = 2
.Version = 9
.Double F1_Power = 4
.Double F2_Power = -4
.Double Formula_Ratio = 0.5
.Double sCurvatureX = 2
.Double sCurvatureY = 2
.Double sCurvatureZ = 2
[SOURCE]
procedure Elazobulb(var x, y, z, w: Double; PIteration3D: TPIteration3D);
var

r, rpow, th, ph, th1, ph1, th2 ,ph2: double;
invpower, x2, y2, z2: double;
intpowerX, intpowerY, intpowerZ : integer;
sinph, cosph, sinth, costh, temp, ratio : double;


begin

//=================================================
// The most advanced part
// instead of radius:= sqrt (x*x+y+y+z*z);
/// calculate radius in space where circle is circle (2), square (1) or Iphone shape (4)
// It is like Lp spaces but different along each axis.
// Using just int values - mutch faster.
//Using inverse of geometric mean. arithmetic mean don't works so well here.

intpowerX:=round(sCurvatureX);
intpowerY:=round(sCurvatureY);
intpowerZ:=round(sCurvatureZ);


// blockchain of conditionals used to speed up more basic versions of this.
//If Curvature X=Y=Z calculate root power without calculating mean value of all
if intpowerX = intpowerY then
  begin

if intpowerY = intpowerZ then  // all curvatures is equal
  begin


if intpowerX = 1 then  // choice 1. If curvatures is 1 then use fastest formula
  begin
r  := abs(x) + abs(y) + abs(z);
end


  else if intpowerX = 2 then  // choice2. If curvatures is 2 then use standart formula
  begin
r  := sqrt( x*x + y*y + z*z);
end


else  //choice 3. else use heavy formulas, equal powers
begin

invpower:= 1/ intPowerX;
temp:=  intPower( abs(x),intPowerX) + intPower( abs(y),intPowerY) +intPower( abs(z),intPowerZ);
r  := power( temp ,invpower);

end;

end

  else  //choice 4 use all heavy operators
  begin


//inverse of geometric mean, calculates necesary root value
invpower:= power(intPowerX *intPowerY *intPowerZ,-0.33333333333333333333);
temp:=  intPower( abs(x),intPowerX) + intPower( abs(y),intPowerY) +intPower( abs(z),intPowerZ);
r  := power( temp ,invpower);


end;
end

  else  //choice 4 use all heavy operators

  begin


//inverse of geometric mean, calculates necesary root value
invpower:= power(intPowerX *intPowerY *intPowerZ,-0.33333333333333333333);
temp:=  intPower( abs(x),intPowerX) + intPower( abs(y),intPowerY) +intPower( abs(z),intPowerZ);
r  := power( temp ,invpower);


end;

//all of this were just to calculate the radius



//===========================================

//same angles for both bulbs;
th := ArcTan2(y, x);
ph := ArcSin(z/r);


//=====================================
// mandelbulbs
//No 1

th1 := th * F1_Power;
ph1 := ph * F1_Power;
rpow  := Power(r, F1_Power);

///calculate sin and cos at once;
   SinCos(th1, sinth, costh);
   SinCos(ph1, sinph, cosph);

// If there is no SinCos function just put () around ph and th
// and add formula number -> rpow * cos(ph1) * cos(th1);

x  := rpow * cosph * costh;
y  := rpow * cosph * sinth;
z  := rpow * sinph;

//=========================================
// mandelbulb
// No 2

// if both bulbs is equal recycle values.

if F1_Power = F2_Power then
begin
x2:=x;
y2:=y;
z2:=z;   
end
 
else
begin

// else calculate other bulb, too

th2 := th * F2_Power;
ph2 := ph * F2_Power;
rpow  := Power(r, F2_Power);

///calculate sin and cos at once;
   SinCos(th2, sinth, costh);
   SinCos(ph2, sinph, cosph);

x2  := rpow * cosph * costh ;
y2  := rpow * cosph * sinth ;
z2  := rpow * sinph ;

end;

//=========================================
// interpolate formulas
// Here is like when on ruler one bulb is on 0 cm another is on 1 cm.

ratio:= (1-Formula_Ratio);

x:=x2*Formula_Ratio + x*ratio + PIteration3D^.J1;
y:=y2*Formula_Ratio + y*ratio + PIteration3D^.J2;
z:=z2*Formula_Ratio + z*ratio + PIteration3D^.J3;


end;
[END]
Version 1.3
Maybe this is one of the most tehcnologicaly advanced mandelbulbs ever (^_^)

Using idea from GNJ - two real power standart mandelbulbs (F1 , F2) interpolated (ratio) - empty middles.

And my
of calculating radius in distorted space - superseed shape:
curvature = 1 - diamond - angular and stretching (floral) bulb
curvature = 2 - sphere - ordinary bulb
curvature = 4 - iphone shape - streamlined - pillow shaped bulb


By tehnologicaly advanced I meant that this is "smart" formula:
if powers or all curvatures is equal it awoyds some slow functions, and 1 1 1 or 2 2 2 uses faster formulas.


Alsou to speed up space Curvature uses only integer values, 1,2,3...
Equal curvatures is more noiseless.

 * * *
By Edgar Malinovsky

Most of the code is for calculation of modified p norm and conditionals.
Elazobulbs could be quite a good name. Not too unpronouncable and not too mathematical like JIT_gnj_TwoRealPowervaryScale_02.m3f
Logged

fractal catalisator
Alef
Fractal Supremo
*****
Posts: 1174



WWW
« Reply #1 on: September 13, 2017, 03:32:19 PM »

Here goes the images. It's the first time I used deviantart for this so I hope it wound "dissapear".

The power = (4, -4) elazobulb with p norm (radius) of "p" = (2, 2, 3).


Mandelbulb3Dv18{
g....ET....x/...m....26...EB4sS.Kvb0.nmlSTy6tVzDNCDBHyrtYznf08ReszqxzuT4XYihVCzD
................................t2.2We1vjz1........4./..................y.2...wD
...Uz6.....e2....w.0/.....U3/...y.....E5......EboVpA54rD/w........Uy/dkpXm1.BnAH
y.EnAngD16../..........wz.................................U0.....y1...sD...../..
.zHnAnoDGpzRbNCg1yPLPa6PsQnQzGVUUU7nNQkjuXrOfli/bx1PKZPOODoRziErk08xa4sjoIkXCHKl
ix16pB95cOwTz8c6ZEU5pbrDU.....oM6...LL...2....sD.6....sD..G.....................
.............oAnAt1...sD....zIg7........................................m....k1.
.....4iSoz1.......Ei.wzzz5.U..6.Z....61...EB....m....k3...UE....8/...MHB....SL5A
Po2U.WeeryDfp3nz....z1....6.5c..zfjp..UhV8JTUGyD6.bgyNvSczH...........k/8.kdBrA.
..KCQAiZ/.A.XwE7eDZzz0........../FU0.wzzz1...........s/...........6.......E.2c..
zzzz............11...................2./8.kzzzD............8....................
/EU0.wzzz1...................................QQef1EXl/f7slE60jC.tt7eacP3dlBr..bc
lOGUSYTyT0Egl0b7jjGyVj7.cmNSag0Crj7W.29TkNmj3ZqjQ1ESQWe7YQJytz7.cWOSaEYPt5ya.U8b
tNG.rRza60.e0ab7..krS7IJzzFW1tRJyzXEwyRJxzprT9IJ.c5HVlKOnVa98/pF................
E....2..F2E.....I....M....UG7FpL3poLCxJFg3aSj7IRg74.............................
...................2./......../k........Uz1........../.........E........6.2.....
................................................................................
........................}
{Titel: Elazobulb_hands}

1





Zoom on it's "bottom"

Mandelbulb3Dv18{
g....UZ....O/...S....26...k7pi2W4okxzeIYPTi3cHxD32j8IUgqEz96FpXoe/Vsz66CTj1hz4zj
................................MR93tjEWa.2........5./..................y.2...wD
...Uz6.....SP....w.0/.....kS0...9/...2E9.....wFrSbY.lGnD/w........U30dkpXm1.D8QR
y.....cD16../..........wz.................................U0.....y1...sD...../..
.zHnAnoD14klUGsElwPR3bj4Gdh9zC0DPelsl5mjcw26ks0/jwnDyh8WYcm4zeeSx4ehd6njeNV5LOGe
VwXSzalj.iXAzSNMLaLgqmmDU.....IcK...Y//..2....sD.6....sD..G.0...................
.............oAnAt1...sD....zIg7........................................S....k1.
.....4iSoz1.....N.kz.wzzz1kP.U8.h/...61....6....m....c3...E9....j....2Y1....TP52
...U.avrazDjTCszzzzzzzzzz1..1c..rTzx...MarH7iXyD6oa4dabdnzH...........I.8.UF4N2.
.sM93P58iz9.eLISw7kxz0........../6U0.wzzz1...........s/...................E.0c..
zzzz.............0...................2U.8.kzzzD............8....................
/6U0.wzzz1...................................QjX.1kqYltqiC0pey/.P467PanJdscb.kWM
dZK.yRjX.1kqYltqYtrxC0A.PH4bPPfTrv6k.gBNQiBxyRjX.1kqYltqXxrxC0A.PH4bPjtTrv6k.gBN
QiRizRjX.1kqYltq..kxC0wgz60peyldoMJ8CuNQfs3.jyeS................................
E....2..F2E.....I....M....UG7FpL3poLCxJFg3aSj7IRg74.............................
...................2./......../k........Uz1........../.........E........6.2.....
................................................................................
........................}
{Titel: Elazobulb_hands_zoom}


2





Julia set of (1,0,0)

Mandelbulb3Dv18{
g....ET....x/...U0...26...EB4sS.Kvb0.nmlSTy6tVzDNCDBHyrtYznf08ReszqxzuT4XYihVCzD
................................t2.2We1vjz1........4./..................y.2...wD
...Uz6....UQ.....w.0/.....Up/...G/....E4......EboVpA54rD/w........Uy/dkpXm1....U
y.UaNadD16../2.........wz.................................U0.....y1...sD...../..
.z1...sDGpzRbNCg1yPLPa6PsQnQzGVUUU7nNQkjuXrOfli/bx1PKZPOODoRziErk08xa4sjoIkXCHKl
ix16pB95cOwTz8c6ZEU5pbrDU.....INA...IU...2....sD.6....sD..G.....................
.............oAnAt1...sD....zIg7........................................U0...k1.
.....4iSoz1.....xzTi.wzzz5.U..6.Z....61...EB....m....k3...UE....7/...MHB....SL5A
Uo3U.WeeryDfp3nz....z1....6.5c..zfjp..UhV8JTUGyD6.bgyNvSczH...........k/8.kdBrA.
..KCQAiZ/.A.XwE7eDZzz0........../FU0.wzzz1...........s/...........6.......E.2c..
zzzz............11...................2./8.kzzzD............8....................
/EU0.wzzz1...................................QQef1EXl/f7slE60jC.tt7eacP3dlBr..bc
lOGUSYTyT0Egl0b7jjGyVj7.cmNSag0Crj7W.29TkNmj3ZqjQ1ESQWe7YQJytz7.cWOSaEYPt5ya.U8b
tNG.rRza60.e0ab7..krS7IJzzFW1tRJyzXEwyRJxzprT9IJ.c5HVlKOnVa98/pF................
E....2..F2E.....I....M....UG7FpL3poLCxJFg3aSj7IRg74.............................
...................2./......../k........Uz1........../.........E........6.2.....
................................................................................
........................}
{Titel: Elazobulb_hands_julia}

3





Another bulb 5,-5 interpolation 0.9 ;2 ,2, 4 with a texture

Mandelbulb3Dv18{
g....../....1...c....26...kAMuiipQd4.z9aUyivWB.Eu4m2zz1DkyXE9VqOPrdvzsfGuaxGCxyj
.................................M9Zp1kZaz1........5./..................y.2...wD
...Uz6....EJK/...Q.0/....2km3...p.....ED.....UPvdQrQkUqD/Q......BJJJ0dkpXm1.NEbq
y.EnAnQD12../.............................................U0.....y1...sD...../..
.zHnAnoDlOYX9LGdtx1AzGF1TVpDzaFt1vgpm/oDWMiDMhIggwnVOU3yGxoRzkdh3AyXBMqDYkzxW8gX
3xP/S2dIhOQNzuLptigTwQrDU.....I6O/..7X1..2....sD.6....sD..G.....................
.............oAnAt1...sD....zIg7........................................G....k1.
.....83iyz1.......kzxwzzzL.U..6.P....61...EB....m..06k3..U.F....6/...c4.....SH5Q
...U.WeeryDfp3nz3ivmz5dFL06.5c..zfjp..UhV8JTUGyD6.bgyNvSczH...........k/8.kdBrA.
..KCQAiZ/.A/XwE7eDZzzC........../EU0.wzzz1...........k/...................E.2c..
zzzz.............0...................2./8.kzzzD............8....................
/EU0.wzzz1...................................QQef1EXl/9gslE60jC.tt7eceP3dlBr..bc
l4PUSYTyT0Egl0LgjjGyVj7.cmNSci0Crj7W.29Tk3vj3ZqjQ1ESQW8eYQJytz7.cWOScGYPt5ya.U8b
tVO.rRza60.e0a5e..krS7YUzzFW1tROyzXEwyxaxzprT9Yn.wKOiFrEgxKRYJ2SkxaQoxpEjp4QV7LO
E....2..F2E.....I....M....UG7FpL3poLCxJFg3aSj7IRg74.............................
...................3./.......E/kVf53iSIsiz1........wz.........zD........E.2.....
................................................................................
........................}
{Titel: MutaGenBDCC1C8EE62F4B5503C1_Elazobulb_knots}

4






And Lp=1 taxicab space bulb of power 40, -40

Mandelbulb3Dv18{
g.....N....Y/...w....26...EJ5p3ODVgzzy3bhPsOZLxDZm.zu8qtSyv/NZjdK3bozy3bhPsOZLxD
................................61JpBG7yzz1........6./..................y.2...wD
...Uz6....U5.....M.0/.....k6/...N.....E4.....gJ2POIWULqD/..........m/dkpXm1.....
z.UaNadD12../..........wz.................................U0.....y1...sD...../..
.zHnAnoDt8Il2Z6sZx1..........Gmb8ANxf5djT8rcxbo35u1S/REk4i9MzYWS80RvjkpD9JYMi2WO
9uX19Tiohz0Lz0LvTyfVv0qDU.....2g/........2....sD.6....sD..G.....................
.............oAnAt1...sD....zIg7........................................2....k1.
.....4iSoz1.......kz.wzzz1.X.Q6.9....61...kA....m....c3...UF....7/...I1...EdhJ5g
Hw3U.ydelyjeYFnzvm9ZzLWiO16.0c..zrhe..EOf5nlcsxj6.Dbqxm4IzH...........2/8.EBl35.
.o0FIhT67.2.hE2Jv5G0./..........3I13.wqN51../0biMaOyzsVsP8OPAXzD/czYfTLkRzH/pElz
5TtN...LVxTtT1yD.yXjDUIN0.2.WRvgcbtszKEA8oDU.06..YKaZ6Aeiz1858nQJ6Tnz.ERpBK.iAwj
/6V0.2FAZ.............klrlkCx9yj.6wTJHz2Vz1..ozz61U7bck7RD.zzH7.aQW0b2X3mHOs.UZ2
6VJBsczNc.EJcIFJOHpzO04.JlG3JV3P..Dw.IFJJJJbm/.wk1E3JJJJOxLzzXA.aQW0bgvTxzDm.Mm7
8QW..qzz61U7bck7...zzHdwuMVwY4ikvPYybV0XJt4.k1De................................
E....2..F2E.....I....M....UG7FpL3poLCxJFg3aSj7IRg74.............................
..................UD./.......s1E........Uz1........wz.........zD........kz1.....
................................................................................
........................}
{Titel: Lp_Mandelbulb_pow30_p1}

5.


I thing these weird things looks the best in space.


EDIT:
I was wrong. Bulb with positive and negative powers very mutch correspondens to to 2D fractal z=  z^n + C / (z - a)^d researched by Robert L. Devaney. http://math.bu.edu/people/bob/papers.html
 z= z^2 + c / (z )^2 -> z^2 + c * z ^-2  (with initialisation condition being z=(2*c/2)^(1/(2+2))
« Last Edit: September 21, 2017, 02:44:13 PM by Alef » Logged

fractal catalisator
Pages: [1]   Go Down
  Print  
 
Jump to:  


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.12 seconds with 27 queries. (Pretty URLs adds 0.004s, 2q)