Logo by Madman - 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 20, 2024, 06:37:03 PM


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 4 ... 7   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: A few formulas (For Luca... :D)  (Read 12736 times)
Description: Who can change the name of this thread... :D
0 Members and 1 Guest are viewing this topic.
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #15 on: October 26, 2015, 05:02:29 AM »

@ M.Benesi

earlier post T4 looks promising, like It is just waiting to be hybridised with a Menger or a MBox.  I think I will code that T4  tnext smiley

I don’t know what is available in M3D, but i use a cheap method for varying Mbulb power (or any constant)

Extra parameters are just  are a single "start at/ stop at variable" iteration choice and the the amount Power Variable.

So it runs with the initial power until start variable,  does a linear increase (or decrease) until the stop variable iteration is met, then continues with the new power until termination. So you can make stop = start and have a sudden change or maybe choose a long transition.   As you know the big changes happen in the first few iterations, so i will run a pwr2 for maybe 1 or 2 iters, then increase.   Being linear it is cheap to run.

I  like using it with CVectors3 constants like "scale", because then I have the three independent scale parameters x, y & z,  So I can choose to scale just the x part for  a few iters, then transition it back to a scale of 1. I can have y increasing and z decreasing.  However the general rule is the more I tweak the lower the render quality.  And I am restricted by the how the DE calc copes with the extra parameters.

,





* benesiPTTransform6.jpg (42.88 KB, 553x199 - viewed 462 times.)
Logged
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #16 on: October 26, 2015, 06:54:50 AM »

@ M.Benesi

earlier post T4 looks promising, like It is just waiting to be hybridised with a Menger or a MBox.  I think I will code that T4  tnext smiley
 nice.  cheesy  I'm currently trying to translate one formula... and having problems.  I'm missing some error in the assembly, tried various things.

  Anyway... if I get it to work, it will be nice... it'll add cool details to the existing pine trees.
here are ChaosPro images, It by itself, and blended with a bulb... it should be mixed with other things...

 

Code:

  Chaospro..  followed by non-working M3D code....  
sx=sqr(sx);
sy=sqr(sy);
sz=sqr(sz);
r=((sx)+(sy)+(sz));

if (r!=0) {
d=18;     //18
dd=2; //2
b=2; //2
nx=(b*sx+r)*((d-dd)*sx-sy-sz)/((d+dd)*sx+sy+sz)+seed;   //seed = -.6
ny=(b*sy+r)*((d-dd)*sy-sx-sz)/((d+dd)*sy+sx+sz)+seed;  // after rotation = 2
nz=(b*sz+r)*((d-dd)*sz-sx-sy)/((d+dd)*sz+sx+sy)+seed;  // this is old code
}


[OPTIONS]
.Version = 2
.DEscale = 1
.SIpower = 2
.Double Seed = -.5
[CONSTANTS]
Double = 9
[CODE]
558BEC81EC300000005356578B75088B7E308BD8D9D0DD03D8C8DD5DF890DD02D8C8DD5DF090DD01D8C8DD5DE8d9d0DD45F8DC45F0DC45

E8DD5DE0d9d0DD45F8DC0FDC45F0DC45E8DD45F8DC0FDC65F0DC65E8DEF9DD45E0DC45F8DEC9DC47F0DC4618DD1BD9D0DD45F0DC0FDC45

F8DC45E8DD45F0DC0FDC65F8DC65E8DEF9DD45E0DC45F0DEC9DC47F0DC4620DD1AD9D0DD45E8DC0FDC45F8DC45F0DD45F0DC0FDC65F8DC

65F0DEF9DD45E0DC45E8DEC9DC47F0DC4628DD19D9D08BC35F5E5B8BE55DC20800
[END]


Description:

  mag xyz z^2 fast...


sx=sqr(sx);
sy=sqr(sy);
sz=sqr(sz);

r=((sx)+(sy)+(sz));

nx=(2*sx+r)*(16*sx-sy-sz)/(20*sx+sy+sz)+seed+pixel;
   //2, 16, and 20 can be variables
ny=(2*sy+r)*(16*sy-sx-sz)/(20*sy+sx+sz)+seed+pixel; // and probably should be variables to tell you the
nz=(2*sz+r)*(16*sz-sx-sy)/(20*sz+sx+sy)+seed+pixel;
// truth... for now, the code uses a simpler form:

nx=(sx+r)*(9*sx-sy-sz)/(9*sx+sy+sz)+seed+pixel;
   // until I get it to work...
ny=(sy+r)*(9*sy-sx-sz)/(9*sy+sx+sz)+seed+pixel;   // learning... assembly.. slowly.
nz=(sz+r)*(9*sz-sx-sy)/(9*sz+sx+sy)+seed+pixel;
   // .....

0100701E   55               PUSH EBP
0100701F   8BEC             MOV EBP,ESP
01007021   81EC 30000000    SUB ESP,30
01007027   53               PUSH EBX
01007028   56               PUSH ESI
01007029   57               PUSH EDI
0100702A   8B75 08          MOV ESI,DWORD PTR SS:[EBP+8]
0100702D   8B7E 30          MOV EDI,DWORD PTR DS:[ESI+30]
01007030   8BD8             MOV EBX,EAX
01007032   D9D0             FNOP


01007034   DD03             FLD QWORD PTR DS:[EBX]    load x
01007036   D8C8             FMUL ST,ST x*x
01007038   DD5D F8          FSTP QWORD PTR SS:[EBP-8] save to EBP
0100703B   90               NOP
0100703C   DD02             FLD QWORD PTR DS:[EDX]   y
0100703E   D8C8             FMUL ST,ST y*y
01007040   DD5D F0          FSTP QWORD PTR SS:[EBP-10] save to EBP
90   nop
01007043   DD01             FLD QWORD PTR DS:[ECX]
01007045   D8C8             FMUL ST,ST
01007047   DD5D E8          FSTP QWORD PTR SS:[EBP-18]


D9D0             FNOP
 DD45 F8          FLD QWORD PTR SS:[EBP-8]
DC45 F0          FADD QWORD PTR SS:[EBP-10]
DC45 E8          FADD QWORD PTR SS:[EBP-18]
0100704C   DEC1             FADDP ST(1),ST
0100704E   DD5D E0          FSTP QWORD PTR SS:[EBP-20]
01007051   D9D0             FNOP
01007053   DD45 F8          FLD QWORD PTR SS:[EBP-8]

558BEC81EC300000005356578B75088B7E308BD8D9D0DD03D8C8DD5DF890DD02D8C8DD5DF090DD01D8C8DD5DE8d9d0DD45F8DC45F0DC45

E8DD5DE0d9d0DD45F8

DC0FDC45F0DC45E8DD45F8DC0FDC65F0DC65E8DEF9DD45E0DC45F8DEC9DC47F0DC4618DD1BD9D0DD45F0DC0FDC45F8DC45E8DD45F0

DC0FDC65F8DC65E8DEF9DD45E0DC45F0DEC9DC47F0DC4620DD1AD9D0DD45E8DC0FDC45F8DC45F0DD45F0DC0FDC65F8DC65F0DEF9DD45E0

DC45E8DEC9DC47F0DC4628DD19D9D08BC35F5E5B8BE55DC20800

01007056   DC0F             FMUL QWORD PTR DS:[EDI]
01007058   DC45 F0          FADD QWORD PTR SS:[EBP-10]
0100705B   DC45 E8          FADD QWORD PTR SS:[EBP-18]
0100705E   DD45 F8          FLD QWORD PTR SS:[EBP-8]
01007061   DC0F             FMUL QWORD PTR DS:[EDI]
01007063   DC65 F0          FSUB QWORD PTR SS:[EBP-10]
01007066   DC65 E8          FSUB QWORD PTR SS:[EBP-18]
01007069   DEF9             FDIVP ST(1),ST
0100706B   DD45 E0          FLD QWORD PTR SS:[EBP-20]
0100706E   DC45 F8          FADD QWORD PTR SS:[EBP-8]
01007071   DEC9             FMULP ST(1),ST
01007073   DC47 F0          FADD QWORD PTR DS:[EDI-10]
01007076   DC46 18          FADD QWORD PTR DS:[ESI+18]
01007079   DD1B             FSTP QWORD PTR DS:[EBX]
0100707B   D9D0             FNOP
0100707D   DD45 F0          FLD QWORD PTR SS:[EBP-10]
01007080   DC0F             FMUL QWORD PTR DS:[EDI]
01007082   DC45 F8          FADD QWORD PTR SS:[EBP-8]
01007085   DC45 E8          FADD QWORD PTR SS:[EBP-18]
01007088   DD45 F0          FLD QWORD PTR SS:[EBP-10]
0100708B   DC0F             FMUL QWORD PTR DS:[EDI]
0100708D   DC65 F8          FSUB QWORD PTR SS:[EBP-8]
01007090   DC65 E8          FSUB QWORD PTR SS:[EBP-18]
01007093   DEF9             FDIVP ST(1),ST
01007095   DD45 E0          FLD QWORD PTR SS:[EBP-20]
01007098   DC45 F0          FADD QWORD PTR SS:[EBP-10]
0100709B   DEC9             FMULP ST(1),ST
0100709D   DC47 F0          FADD QWORD PTR DS:[EDI-10]
010070A0   DC46 20          FADD QWORD PTR DS:[ESI+20]
010070A3   DD1A             FSTP QWORD PTR DS:[EDX]
010070A5   D9D0             FNOP
010070A7   DD45 E8          FLD QWORD PTR SS:[EBP-18]
010070AA   DC0F             FMUL QWORD PTR DS:[EDI]
010070AC   DC45 F8          FADD QWORD PTR SS:[EBP-8]
010070AF   DC45 F0          FADD QWORD PTR SS:[EBP-10]
010070B2   DD45 F0          FLD QWORD PTR SS:[EBP-10]
010070B5   DC0F             FMUL QWORD PTR DS:[EDI]
010070B7   DC65 F8          FSUB QWORD PTR SS:[EBP-8]
010070BA   DC65 F0          FSUB QWORD PTR SS:[EBP-10]
010070BD   DEF9             FDIVP ST(1),ST
010070BF   DD45 E0          FLD QWORD PTR SS:[EBP-20]
010070C2   DC45 E8          FADD QWORD PTR SS:[EBP-18]
010070C5   DEC9             FMULP ST(1),ST
010070C7   DC47 F0          FADD QWORD PTR DS:[EDI-10]
010070CA   DC46 28          FADD QWORD PTR DS:[ESI+28]
010070CD   DD19             FSTP QWORD PTR DS:[ECX]
010070CF   D9D0             FNOP
010070D1   8BC3             MOV EAX,EBX
010070D3   5F               POP EDI
010070D4   5E               POP ESI
010070D5   5B               POP EBX
010070D6   8BE5             MOV ESP,EBP
010070D8   5D               POP EBP
010070D9   C2 0800          RETN 8



[/code]
Logged

mclarekin
Fractal Senior
******
Posts: 1739



« Reply #17 on: October 26, 2015, 12:46:37 PM »

Playing with BenesiMagTransformOne is too distracting. I am sure I should be doing something else smiley


A BenesiMagTransformOne test

 BenesiMagTransformOne is set for late starting, so is missing during first iteration, therefore it's influence is greatly reduced.

Using  two transforms:-

    BenesiMagTransformOne (scale.xyz = 2, offset.x = 2, start itr = 1)
    Standard MB pwr9   +C = ( c.x *1.0,  c.y *0.4,  c.z * 0.2)

Three loop sequences:-

Image 1)  NO Benesi!
{
Mbulb;
}

Image 2)  BenesiMbulb loop
{
Benesi;
Mbulb;
}

Image 3) BenesiMagTransformOne is enclosed in an additional transform.
{
tempC = z;
Benesi;
z += tempC; // TODO  * someConstantModifierParameter;
Mbulb;
}

Number 2 gets my vote!


* benesiPTTransform8.jpg (213.91 KB, 1169x300 - viewed 254 times.)
Logged
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #18 on: October 26, 2015, 05:46:35 PM »

Hey... the real test is for the pow 2.  Pow 2 Mandelbulbs are pretty boring, for the most part.  Try doing a power 2 (all the images I've been posting have been z^2... pow 2).

  For other things (this requires more formulas to be used, using up valuable tabs!).  If you want to hybridize an Amazing Box with a Bulb, rotate to mag, _amazing box (no c!!, scale ~1.7), rotate back, pine tree bulb no YZ.  The rotations, plus not adding in the x component make it more interesting.  

  Still... I like just the plain old Pine1 no x, pine 1, pine 1 no x *2, transform 2,3,4  (4 is.. well, very nice)... etc. 


* BenesiRotateToMag.m3f (5.39 KB - downloaded 103 times.)
* BenesiRotateBack.m3f (2.79 KB - downloaded 101 times.)
« Last Edit: October 26, 2015, 05:55:32 PM by M Benesi » Logged

M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #19 on: October 26, 2015, 10:17:43 PM »

and Luca is going to kill me... tongue stuck out  T5 is on board.  I wanted to do a trick that I learned from Inigo Quilez's website- to make things a bit more "square" and sharp.  

  


  Still, I need to edit descriptions of these transforms.  Will do so soon.  Downloaded Mandelbulber, have some stuff to do this afternoon, but might figure out how to transfer the formulas later tonight, or tomorrow.  

  T5 is attached....  I think I used ~1.7,1.7 for the image.. I forget.  attached its param file because.... I forget.cheesy

* BenesiTransform5b.m3f (6.23 KB - downloaded 107 times.)
* T5b 3noyz 2xyz.m3p (1.93 KB - downloaded 104 times.)
Logged

mclarekin
Fractal Senior
******
Posts: 1739



« Reply #20 on: October 27, 2015, 02:49:07 AM »

My Slow Progress

So far  I have learnt that Delta DE works for all fractals so I can now render  discontinuous functions. Cool, but takes a lot longer to render sad.

I  can do the bensei pinetree with my existing tab as I have two Multi-Mbulbs Transforms in my loop,  So I simply  “zero”  C.y & C.z with a 0.0 constant multiplier in Mbulb number 1. So alternating Ptx, Ptxyx,. ….

I also have two copies of BenseiMagTransformOne in the loop.  ( I should have coded all your transforms by now, plus the fast non-trig PWR2 PineTrees, but I enjoy exploring more than coding, and I get sidetracked easily.)

I am thinking about turning  BenseiMagTransformOne into three separate transforms (a bit slower but more possibilities for exploring),

mag forward;
z = abs(z);   // will try replace with z = abs( z + const.A ) - abs ( z - const.B ) - z;
mag back;

I am currently sidetracked with the “mag” transform and want to try and find where I can use it without being slowed down with DeltaDE. Defiantly the beauty is with the PWR2 PineTee but I am sure “mag” transform will be useful in all sorts of fractal formulas.

Oh know!!  T5 already!! I coding is getting waaaay behind.  smiley

Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #21 on: October 27, 2015, 02:55:02 AM »

Using Multiple C values

Many fractals are made up of  more than one transform, the last being the adding of C pixels.

I call the the current z value prior to an individual transform in the loop, a new tempC “pixels”. Hence I can apply a different tempC to each transform that makes up the “fractal”.

In making image 3 I used a BenseiMagTransformOne and placed it as transform number 18 in the iteration loop, ( with 1 - 17 disabled). So In my terminology BenseiMagTransformOne is T18 and it produces z18 Cvector. The previous z leading into this transform is called c18. So at the end of the transform the addition of a pixel component was ;-

 z18 += c18; 

If I also enable transforms T4, T5 & T6,  then for c18 I have the choice of

 c18 = c4, c5, c6 or original Cpixels   or a modified combinations of tempC's.

e.g.  a chaotic tempC could be  c18  = ( c4.x + c5.x,  atan(c6.y/c4.y), sin(c6.z /(c4.x + c5.y))); and would create a mess, but keeping it simple works in some cases.

This approach can cause massive discontinuity, and if I had not recently learnt to use DeltaDE, it would be un-renderable.

Simply by applying a constant multiplier to c18, I can dictate it's influence on z18. So image 2 is just image 3  with constant multiplier set to 0.0 (I.e no “c18” influence).

I will now forget about this subject, and try and catch up with my coding. grin
Logged
ericr
Fractal Fanatic
****
Posts: 318


« Reply #22 on: October 27, 2015, 08:38:47 AM »

your fractal are wonder full !
is it possible to make apollonian gasekt wih it ?
inormaly yes, like all but how amazingisf  donest work , your farctal are not isf

thx  for your big job and answering if you want
Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #23 on: October 27, 2015, 01:49:57 PM »



Coded the fast Pinetree pwr2.  It sure is beautiful grin


* MB6 xbenPTTfast ooo5 184.jpg (176.96 KB, 800x600 - viewed 214 times.)
Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #24 on: October 27, 2015, 05:03:51 PM »

Strange. I remember it more "fat" not empty inside. But I may be wrong wink
Logged

No sweat, guardian of wisdom!
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #25 on: October 27, 2015, 05:12:43 PM »

  Good Job Mclarekin!  You can use the code you used to make that as a template to do the other transforms.  I left out the bulb portion for the other transforms.


  Luca- increasing the offset makes it more "hollow" on the inside. 
Logged

M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #26 on: October 27, 2015, 05:56:51 PM »

your fractal are wonder full !
 Thank you again!
is it possible to make apollonian gasekt wih it ?
 (repeat from other thread)  I did something like that a while ago- I don't recall the exact steps, but I think I did a spherical inversion of T2.

  I think T2 and T4 are basically the spaces around the spheres in a Apollonian sphere packing with a large central sphere.

  Basically ended up with a sphere in the center, instead of space, and lots of spheres around it instead of having the space in between the spheres.  At first glance, I don't see a ready made formula in M3D to do the spherical inversion that I did...  I think I did it in Fragmentarium??

  I don't think it was super interesting, but it might be interesting hybridized with other fractals, so if I can figure out how to port it to M3D (having a bit of trouble with some assembly language, because I hadn't written in assembly until this past week), we can try it out.
« Last Edit: October 27, 2015, 06:46:16 PM by M Benesi » Logged

mclarekin
Fractal Senior
******
Posts: 1739



« Reply #27 on: October 27, 2015, 08:54:47 PM »

So I created  Benesis_Tranforms UI, it has 35 transforms, so far only five of them being Benesi.  My image had an extra  normal addC and a little bit of spherical offset.


 BenesiMagFormulaOne is such a cool fold on its own. The basic cube can be changed into lots of interesting geometric shapes smiley smiley smiley smiley smiley smiley smiley.

Using DeltaDE is slow but  the rewards are certainly worth it. Thanks  guys . A Beer Cup A Beer Cup A Beer Cup


Logged
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #28 on: October 28, 2015, 09:30:43 AM »


This is C++ versions,  ( WARNING McLarekin code may contain mistakes, bad coding and un-optimisations.)

benesiFastPwr2PineTree
Code:
    CVector3 temp = z;
    z *= z;
    double t = 2 * temp.x/sqrt(z.y + z.z);
    z.x = (z.x - z.y - z.z) + c.x * benesiFastPwr2PineTree.constantMultiplierVect.x;
    z.z = (t * (z.y - z.z)) + c.y * benesiFastPwr2PineTree.constantMultiplierVect.y;
    z.y = (2 * t * temp.y * temp.z)  + c.z * benesiFastPwr2PineTree.constantMultiplierVect.z;

benesiMagTransformOne
Code:
    CVector3 temp = z;
    CVector3 tempV1;
    CVector3 newZ;
    tempV1.x = z.x * 0.81649658092772603273242802490196 - z.z * 0.57735026918962576450914878050196;
    newZ.z = z.x * 0.57735026918962576450914878050196  +  z.z * 0.81649658092772603273242802490196;
    newZ.x = (tempV1.x  - z.y) * 0.70710678118654752440084436210485;
    newZ.y = (tempV1.x  + z.y) * 0.70710678118654752440084436210485;
    newZ.x = fabs(newZ.x);
    newZ.y = fabs(newZ.y);
    newZ.z = fabs(newZ.z);
    tempV1.x = (newZ.x + newZ.y) * 0.70710678118654752440084436210485;
    newZ.y = (-newZ.x + newZ.y) * 0.70710678118654752440084436210485;
    newZ.x = tempV1.x * 0.81649658092772603273242802490196 + newZ.z * 0.57735026918962576450914878050196;
    newZ.z = -tempV1.x * 0.57735026918962576450914878050196 + newZ.z * 0.81649658092772603273242802490196;
    z = benesiMagTransformOne.scale * newZ - benesiMagTransformOne.offset; // applying six variables:-  scale.x, scale.y, scale.z,  offset.x, offset.y, offset.z
Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #29 on: October 28, 2015, 09:53:15 AM »

Question! Why don't you use constants smiley
Logged

No sweat, guardian of wisdom!
Pages: 1 [2] 3 4 ... 7   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
has anybody tried using ifs formulas with the mandelbuld/mandelbox formulas? 3D Fractal Generation cKleinhuis 4 14583 Last post May 05, 2010, 03:17:07 PM
by Power 8
More Formulas? Mandelbulb 3d The Rev 2 3985 Last post November 21, 2010, 11:51:25 PM
by The Rev
Rot Box formulas Mandelbulb 3d The Rev 7 4881 Last post December 21, 2010, 01:37:13 PM
by Power 8
Formulas Mandelbulb 3d scheven_architect 5 5668 Last post April 28, 2011, 05:51:13 PM
by DarkBeam
Using formulas Mandelbulb 3d « 1 2 3 » Martial 43 5735 Last post February 09, 2012, 02:04:00 PM
by Jesse

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.157 seconds with 25 queries. (Pretty URLs adds 0.013s, 2q)