M Benesi
|
|
« on: March 10, 2011, 10:59:42 PM » |
|
So, a long time ago, in a fractal deep deep in zoom, I came up with a formula (while searching for the elusive grail). Recently, for the hell of it, I started messing with it again. I fiddled with it <the formula> a bit and got it.. a little crisper. 4th order (2 types, the first is the original posting, the 2nd is the improved formula, although the straight on shot doesn't show how much more awesome the formula is. The 2nd formula is better to zoom into, although the first variation has its moments.): Click to view bigger in new tab: 1st image is a zoom into the first tower (straight ahead) of the second formula, 2nd image is from the newest formula variation... even betterer (click 'em to biggify): Here are a few z^2, slightly interesting areas (last one is incomplete render.. gotta stop fur da' night)... gotta explore a bit more and get the tower tomorrow: I can't really tell which is "better"..... for now. Jeez... if only there was some mathematical way to determine which is better... Mag vs. xyz improved... more images follow. This is a 5th order (first formula from above, not the zoomin formula)... see if you can pick out the differences from the 4th order above.
|
|
« Last Edit: March 11, 2011, 07:37:24 AM by M Benesi »
|
Logged
|
|
|
|
KRAFTWERK
|
|
« Reply #1 on: March 11, 2011, 11:24:22 AM » |
|
I think this one is beautiful Benesi! (from an artistic viewpoint )
|
|
|
Logged
|
|
|
|
M Benesi
|
|
« Reply #2 on: March 12, 2011, 02:39:45 AM » |
|
Thanks man, I like it too. Reminds me of an arcane tower with those strange symbols around its base. It doesn't look too great when enlarged, but if I re-rendered it with another iteration and enlarged it, then shrank it down to something smaller it might look really cool. Anyways, changed the formula yet again and got something wicked cool. Working on a first z^2 at the moment, gotta explore this new variant. Way awesomer... so I'll retry that tower with it. Blehh.. New variant isn't way awesomer.. Here is something from the.. tightest variant.. or maybe not the tightest.. can't decide... But you can zoom into it deeeeppply and find replicating structures- very similar yet changed. so... who knows. Also a zoom into the top of one of the pillars of the 4th order below (next set of images), it also happens to be a top down view of the pillar in the image beside it although the color scheme is a bit different and.. well, I forget the rest (weird how flat it looks... but it isn't... ). Click to biggify in a new tab: Here are a z^2,z^3,z^4 straight down on the structures... or something like that... with decent color assignment (in my opinion), as always, click to biggify in a new tab:
|
|
« Last Edit: March 12, 2011, 09:56:30 AM by M Benesi »
|
Logged
|
|
|
|
DarkBeam
Global Moderator
Fractal Senior
Posts: 2512
Fragments of the fractal -like the tip of it
|
|
« Reply #3 on: March 13, 2011, 12:02:07 AM » |
|
Heyy please leave us the formula for porting in MB Cheers Luca
|
|
|
Logged
|
No sweat, guardian of wisdom!
|
|
|
M Benesi
|
|
« Reply #4 on: March 13, 2011, 02:00:16 AM » |
|
The formula is a bit.. interesting. If you recall the second formula I PM'ed you a few days back, it's based on that one, but a modified version. The second formula (that I sent you) wasn't that great- it had some interesting properties, but was very stretched and chaotic, in addition to being hard to zoom into without using a realllllly high resolution check. Something I'd like to see is a switch (boolean check box) to change between 2 modes (I haven't looked into programming for MB 3d, don't know if I need the source and gotta compile or what).... anyways, if you'd include it, I'd like it. An additional note: I allow myself the option to set c (c=pi/2 for exploring... but....). You can stretch the fractal in various ways (setting c lower, closer to sqrt 2 makes the pillars taller, setting c higher makes things flatter- although you can get interesting details by using a higher c in the southern quadrant. //initialization - only need to do this part once per pixel, but you can repeat it if you like to do extra steps.. // really, it's up to you
c=pi/2;
a=n*c; // n is your z^n thingy... called n b=c^(3-n); // sometimes I use b*[(n-1)^-1] but just do the main one there
// iteration part
r=(x^2+y^2+z^2); r1=(x^2*b+r)^(n/2); //changed it after DarkBeam pointed out formula didn't work r2=(y^2*b+r)^(n/2); // was x*b, y*b, z*b when it should have been r3=(z^2*b+r)^(n/2); // x^2 * b, y^2*b, and z^2 *b in the magnitudes... like it is in my formula... lol r=sqrt(r);
theta= atan2 (abs (x) * a + flip (r)); //atan2 is the arg function for gettin' yer angles.. phi= atan2 (abs (y) * a + flip (r)); // flip changes the real value r to the imaginary value to use with tango= atan2 (abs (z) * a + flip (r)); // the function atan2. In other words, the flipped part is imaginary
new_x= r1 * cos (theta * n); new_y= r2 * cos (phi * n); new_z= r3 * cos (tango * n);
// now here is the part where I want the switch thrown in, before you add in the pixel or Julia components // You might want to disable the switch for n=4,8,12... because it makes discontinuous fractals... // but I think I just coded it for you below... anyways..
if (switch) { if (n==2) { if (pixelr>0 && x*a>r) { // pixelr is the x component of the pixel nx=-nx; } if (pixeli>0 && y*a>r) { // pixeli is the y component of the pixel ny=-ny; } if (pixelj>0 && z*a>r) { // pixelj is the z component of the pixel nz=-nz; } } else if (n != 4 && n!==8 && n!=12) { // you know... nobody is every gonna use n>15, just like we if (pixelr>0 && x>0) { // will never need more than 640k on a computer, so we nx=-nx; // don't have to make lots of ! statements.. } // != means does not equal... in case of questions.. if (pixeli>0 && y>0) { // && means logical and.... maybe you don't need the n!=12? ny=-ny; } if (pixelj>0 && z>0) { nz=-nz; } } }
// now add in your pixel or Julia components... measure bail, etc. // make sure you check squares (for bailout) instead of absolute values of new components, // it makes a smoother nicer looking fractal..
That should be it.. if I didn't forget something important... which happens. The switch is pretty cool for the z^2... makes certain areas interesting. More boring for the higher n z^n, as I prefer the sharpness of the regular version, but it's really up to the person doing the spelunking.... Here is a z^2 tree, at the -,-,- point; followed by 2 switched mode z^2 at the +,+,- area (one viewed down from above, one viewed towards the point), as always, click to biggify: Here is the z^2 southern quadrant [(-,-,-) on the -z side] and a z^2 julia: Later, the z^4 southern quadrant, with a cavern.... ... and here it is; update: added another one: And this is right above the 2 holed one above... you can spelunk in the holes if you want...
|
|
« Last Edit: March 13, 2011, 08:18:37 PM by M Benesi »
|
Logged
|
|
|
|
DarkBeam
Global Moderator
Fractal Senior
Posts: 2512
Fragments of the fractal -like the tip of it
|
|
« Reply #5 on: March 13, 2011, 09:06:49 AM » |
|
Big thanks, I will try to implement this "monster" //initialization - only need to do this part once per pixel, but you can repeat it if you like to do extra steps.. // really, it's up to you // c=pi/2; -> this will be user defined a=n*c; // n is your z^n thingy... called n b=c^(3-n); // sometimes I use b*[(n-1)^-1] but just do the main one there // iteration part r=sqrt(x^2+y^2+z^2); // since r^2 is used only once I prefer this theta= atan2 (abs (x) * a + flip (r)); //atan2 is the arg function for gettin' yer angles.. phi= atan2 (abs (y) * a + flip (r)); // flip changes the real value r to the imaginary value to use with tango= atan2 (abs (z) * a + flip (r)); // the function atan2. In other words, the flipped part is imaginary // note that atan2(x,y) = atan(y,x) - at least in assembly new_x=(x*b+r*r)^(n/2); // Moved here - in assembly too many variables cause trouble new_x= new_x * cos (theta * n); // so I prefer to recycle new_x and not to introduce another variable new_y=(y*b+r*r)^(n/2); new_y= new_y * cos (phi * n); new_z=(z*b+r*r)^(n/2); new_z= new_z * cos (tango * n); //r=sqrt(r);// now here is the part where I want the switch thrown in, before you add in the pixel or Julia components // You might want to disable the switch for n=4,8,12... because it makes discontinuous fractals... // but I think I just coded it for you below... anyways.. if (switch) { if (n==2) { if ( Cx>0 && x*a>r) { nx=-nx; // who is "nx"? new_x? // in MB we call components Cx, Cy, Cz } if ( Cy>0 && y*a>r) { ny=-ny; } if ( Cz>0 && z*a>r) { nz=-nz; } } else if (n != 4 && n!==8 && n!=12) { // you know... nobody is every gonna use n>15, just like we if (Cx>0 && x>0) { // will never need more than 640k on a computer, so we nx=-nx; // don't have to make lots of ! statements.. } // != means does not equal... in case of questions.. if (Cy>0 && y>0) { // && means logical and.... maybe you don't need the n!=12? ny=-ny; } if (Cz>0 && z>0) { nz=-nz; } } } // now add in your pixel or Julia components... measure bail, etc. // make sure you check squares (for bailout) instead of absolute values of new components, // it makes a smoother nicer looking fractal..
|
|
« Last Edit: March 13, 2011, 09:37:28 AM by DarkBeam »
|
Logged
|
No sweat, guardian of wisdom!
|
|
|
DarkBeam
Global Moderator
Fractal Senior
Posts: 2512
Fragments of the fractal -like the tip of it
|
|
« Reply #6 on: March 13, 2011, 05:23:45 PM » |
|
Nothing, it does not work. Probably I mistaken some codes?
|
|
|
Logged
|
No sweat, guardian of wisdom!
|
|
|
M Benesi
|
|
« Reply #7 on: March 13, 2011, 07:58:52 PM » |
|
Nothing, it does not work. Probably I mistaken some codes? The code you posted looks all right... but I could have missed something... and I see it! It was a mistake in the code I posted for you... which I just corrected (with a note): new_x=(x*b+r*r)^(n/2); new_x= new_x * cos (theta * n); new_y=(y*b+r*r)^(n/2); new_y= new_y * cos (phi * n); new_z=(z*b+r*r)^(n/2); new_z= new_z * cos (tango * n);
Bold parts should be: new_x=( x*x*b+r*r)^(n/2); //x^2*b + r^2... instead of x*b... new_y=( y*y*b+r*r)^(n/2); //y^2*b... instead of y*b.... new_z=( z*z*b+r*r)^(n/2); //z^2 *b.... you get it ... Then your pixel or Julia components (after switch check...). Big thanks, I will try to implement this "monster" It is a big booger, ehh? // c=pi/2; -> this will be user defined Can you set it up to default to pi/2 so users don't have to guess what value is best? pi/2= 1.5707963267948966192313216916398 more or less.. use as many digits as you like, I can give you more: pi/2= 1.5707963267948966192313216916397514420985846996875529104874722961539082031431044993140174126710585339910740432566411533235469223047752911158626797040642405587251420513509692605527798223114744774651909822144054878329667230642378241168933915826356009545728242834617301743052271633241066968036301245706368622935033031577940874407604604814146270458576821839462951800056652652744102332606920734759707558047165286351828797959765460930586909663058965525592740372311899813747836759428763624456139690915059745649168366812203283215430106974731976123685953510899304718513852696085881465883761923374092338347025660002840635726317804138928856713788948045868185893607342204506124767150732747926855253961398446294617710099780560645109804320172090799068148873856549802593536056749999991864890249755298658664080481592975122297276734541513212611541266723425176309655940855050015689193764432937666041907103085888345736517991267452143777343655797814319411768937968759788909288902660856134033065009639383055979546082100994690476286005327429316394329680766909139841151509760176509264844978868112997069456248608876417395657577874286212270753479754147665584308639279445375491908773187324696596275302004638508355695049244120064291808017818538300523550909714777980994733839187247241276898873634235520237673231040233421295347456466568385144945760523760810284830120290190750967556266912150177938201237482366319570996363021349613983911773908180046708608206099622931575151430914872778533749192527472942934634978454636053987546514776605826724936013779801182403327495599409173988767831849037132712639312759092087873364454888863969000408235300080726245960866086073861750707209867842740806805786762760667378709247342192616619536970716672738812084312594917847427810496096110921362751271284438358952473008267334024943136163958930428921919139839883407270504769418931804753400321125626025586964924480420642443134728021209826425111053305931533721393110195974725235618568934804781821859586437338823287869812069454329163229979066952390137950497328820394756347341991762978549129113102612447 nx=-nx; // who is "nx"? new_x? Lol.. yeah, nx is new_x... sorry about that. I space out sometimes- I don't write out new_x, new_y, new_z in my formulas- I use nx,ny,nz... and for the starting x,y, and z I use sx, sy, and sz (if I space out again). // in MB we call components Cx, Cy, Cz
I think I saw Jesse use Cx, Cy, and Cz before.. about 10 days ago. sheesh...
|
|
« Last Edit: March 13, 2011, 08:20:53 PM by M Benesi »
|
Logged
|
|
|
|
DarkBeam
Global Moderator
Fractal Senior
Posts: 2512
Fragments of the fractal -like the tip of it
|
|
« Reply #8 on: March 13, 2011, 08:24:37 PM » |
|
The code you posted looks all right... but I could have missed something... and I see it! It was a mistake in the code I posted for you... which I just corrected (with a note): new_x=(x*b+r*r)^(n/2); new_x= new_x * cos (theta * n); new_y=(y*b+r*r)^(n/2); new_y= new_y * cos (phi * n); new_z=(z*b+r*r)^(n/2); new_z= new_z * cos (tango * n);
Bold parts should be: new_x=( x*x*b+r*r)^(n/2); //x^2*b + r^2... instead of x*b... new_y=( y*y*b+r*r)^(n/2); //y^2*b... instead of y*b.... new_z=( z*z*b+r*r)^(n/2); //z^2 *b.... you get it ... Then your pixel or Julia components (after switch check...). Tonight i'm gonna kill you... I lost an entire day behind this formula Check it again very accurately, so I can re-code it safely. Coding formulas in assembly is really hard but if you write em wrong!...
|
|
|
Logged
|
No sweat, guardian of wisdom!
|
|
|
DarkBeam
Global Moderator
Fractal Senior
Posts: 2512
Fragments of the fractal -like the tip of it
|
|
« Reply #9 on: March 13, 2011, 08:53:31 PM » |
|
For now, it looks like this.
|
No sweat, guardian of wisdom!
|
|
|
M Benesi
|
|
« Reply #10 on: March 14, 2011, 01:00:49 AM » |
|
I don't know what it is. I'll look through it carefully. My code, without the switch at the end, and NOT re-written to make it easier. I re-wrote it before and missed that one squaring part... I'll re-look at it again, but I thought that was the only main problem. // initialization part
if (juliaMode) { sx=pixelr; // sx is the starting x value, x for your equations x=sx sy=pixeli; // Cx= pixelr, Cy=pixeli, etc... sz=pixelj; } else { sx=cr; // cr is the x seed component, usually 0 for Mandelbrot mode sy=ci; // ci is the y seed... etc. sz=cj; }
c=pi/2; // make sure this is set right a=n*c; // n is your z^n value b=c^(3-n);
// iteration part r=(sqr(sx)+sqr(sy)+sqr(sz)); // sqr(sx) means square x component- sqr() is a fast squaring algorithm same as x*x
r1=(sqr(sx)*b+r)^(n/2); // if you don't take the sqrt of r in the beginning, you avoid 3 squaring operations... r2=(sqr(sy)*b+r)^(n/2); r3=(sqr(sz)*b+r)^(n/2);
r=sqrt(r); //then take your square root to do your atan2 (not atan!)
theta=atan2 (abs(sx) * a + flip(r)); // abs(sx) means take the absolute value of your x component phi=atan2 (abs(sy) * a + flip(r)); // Make sure that you use arg or atan2---atan does NOT work because tango=atan2 (abs(sz) * a + flip(r)); // of zeros (x,y, and z are initially zero... unless seeded) //flip (r) means make r the imaginary component for the atan2 (or arg) function
// if using arg or atan2, make sure to use it correctly- do not // divide by zero, if using arg make sure to make the r component imaginary // to avoid a divide by zero error, I usually multiply and have the divisor taken to ^-1 // in other words: x / r = x * r^-1
nx=r1*cos(theta*n); // nx is new_x... ny is.... new_y, etc.. ny=r2*cos(phi*n); nz=r3*cos(tango*n);
if (juliaMode) { sx=nx+cr; sy=ny+ci; sz=nz+cj; } else { sx=nx+(pixelr); // for you x= new_x + Cx; sy=ny+(pixeli); sz=nz+(pixelj); }
bailout=sqr(sx)+sqr(sy)+sqr(sz);
1) The formula doesn't work with atan, I just tried it... and I don't know why it doesn't work with it, as the values I provide are always positive.... Maybe the atan function is buggy? So- use arg or atan2 if you can find code for them- although this shouldn't be a problem as Jesse has used my trig formulas before (I believe, but maybe not?). I noticed that you said atan2 was the same as atan (more or less) for assembly language... but there may be a problem there, although I can't think of what it would be (if y=0, it should return pi/2). 2) When you initialize, make sure you set x, y, and z to 0 (or Cx, Cy, and Cz or Julia seed...) for the first iteration.
|
|
« Last Edit: March 14, 2011, 01:37:57 AM by M Benesi »
|
Logged
|
|
|
|
DarkBeam
Global Moderator
Fractal Senior
Posts: 2512
Fragments of the fractal -like the tip of it
|
|
« Reply #11 on: March 14, 2011, 09:09:08 AM » |
|
Hey this can be the clue. MB sets always xyz to Cxyz, so this should be changed Have you inverted x and y before passing to atan?
|
|
« Last Edit: March 14, 2011, 09:12:38 AM by DarkBeam »
|
Logged
|
No sweat, guardian of wisdom!
|
|
|
DarkBeam
Global Moderator
Fractal Senior
Posts: 2512
Fragments of the fractal -like the tip of it
|
|
« Reply #12 on: March 14, 2011, 12:19:17 PM » |
|
Another point of doubt; theta=atan2 (abs(sx) * a + flip(r)); But if sx=sy=sx=0 everywhere, surely r=0 everywhere. Then abs(sx) * a=0, atan2(0,0)=0. (if you don't get a div by zero error) cos(0*n)=1. r1=r2=r3=0. then newx=0 and newy=newz=0. Now x=newx+cx = cx ... So, x=cx,y=cy.... equals to x=0,y=0... at beginning of iterations. Another thing that puts me on alarm is b=c^(3-n) - it is okay as long as c=pi/2 BUT! if c=0 tell me how can you do 0^-something From wikipedia: " In the Intel Architecture assembler code, atan2 is known as FPATAN (floating-point partial arctangent) instruction.[6] It can deal with infinities and results lie in the interval [ − π, + π] (closed interval), e.g. . Particularly, FPATAN is defined when both arguments are zero" It's what I use. Obviously if angle=0, as predicted, nothing is drawn (0^-something involves in errors). Attached image of the "fractal". I tried to swap / not swap before doing fpatan, well nothing really different can be seen! Image attached okay now I copy the assembly code commented. Boring but useful? 66842149 55 PUSH EBP // intro 6684214A 8BEC MOV EBP,ESP // intro 6684214C 81EC 40000000 SUB ESP,40 // allocate memory in the stack 66842152 53 PUSH EBX // intro 66842153 56 PUSH ESI // intro 66842154 57 PUSH EDI // intro 66842155 8B75 08 MOV ESI,DWORD PTR SS:[EBP+8] // intro 66842158 8B7E 30 MOV EDI,DWORD PTR DS:[ESI+30] // intro 6684215B 8BD8 MOV EBX,EAX // intro 6684215D D9D0 FNOP // separator 6684215F DD47 F0 FLD QWORD PTR DS:[EDI-10] // edi-10 is N 66842162 DC4F E8 FMUL QWORD PTR DS:[EDI-18] // edi-18 is C 66842165 DD5D F8 FSTP QWORD PTR SS:[EBP-8] // SAVE into stack room 1 66842168 D9D0 FNOP // separator 6684216A 90 NOP // separator 6684216B DD47 F0 FLD QWORD PTR DS:[EDI-10] // edi-10 is N 6684216E DC2F FSUBR QWORD PTR DS:[EDI] // 3-N (EDI is constant = 3) 66842170 DD47 E8 FLD QWORD PTR DS:[EDI-18] // edi-18 is C 66842173 D9F1 FYL2X // fixed sequence for pow(x,y) - we MUST load exponent then base; else we MUST swap! 66842175 D9E8 FLD1 // fixed sequence for pow(x,y) 66842177 D9C1 FLD ST(1) // fixed sequence for pow(x,y) 66842179 D9F8 FPREM // fixed sequence for pow(x,y) 6684217B D9F0 F2XM1 // fixed sequence for pow(x,y) 6684217D DEC1 FADDP ST(1),ST // fixed sequence for pow(x,y) 6684217F D9FD FSCALE // fixed sequence for pow(x,y) 66842181 D9C9 FXCH ST(1) // fixed sequence for pow(x,y) 66842183 DDD8 FSTP ST // fixed sequence for pow(x,y) end 66842185 DD5D F0 FSTP QWORD PTR SS:[EBP-10] // SAVE into stack room 2 66842188 D9D0 FNOP // separator 6684218A DD03 FLD QWORD PTR DS:[EBX] // this block makes: x*x+y*y+z*z 6684218C D8C8 FMUL ST,ST 6684218E DD02 FLD QWORD PTR DS:[EDX] 66842190 D8C8 FMUL ST,ST 66842192 DD01 FLD QWORD PTR DS:[ECX] 66842194 D8C8 FMUL ST,ST 66842196 DEC1 FADDP ST(1),ST 66842198 DEC1 FADDP ST(1),ST // done 6684219A D9FA FSQRT // sqrt(x*x+y*y+z*z). i leave this into fp stack. 6684219C D9D0 FNOP // separator 6684219E DD03 FLD QWORD PTR DS:[EBX] // EBX is X 668421A0 D9E1 FABS // ABS(X) 668421A2 DC4D F8 FMUL QWORD PTR SS:[EBP-8] // EBP-8 = 1ST stack room = a 668421A5 D9C1 FLD ST(1) // st(1) = 1ST fp stack room(1) = SQRT(R) 668421A7 D9C9 FXCH ST(1) 668421A9 D9F3 FPATAN // exchange then do atan2(previous arguments) 668421AB DD5D E8 FSTP QWORD PTR SS:[EBP-18] // save into room3 + free fp stack - st now is SQRT(R) again 668421AE D9D0 FNOP 668421B0 DD02 FLD QWORD PTR DS:[EDX] // EDX is Y 668421B2 D9E1 FABS 668421B4 DC4D F8 FMUL QWORD PTR SS:[EBP-8] // EBP-8 = 1ST stack room = a 668421B7 D9C1 FLD ST(1) // EBP-8 = fp stack room(1) = SQRT(R), as before 668421B9 D9C9 FXCH ST(1) 668421BB D9F3 FPATAN 668421BD DD5D E0 FSTP QWORD PTR SS:[EBP-20] // save into room4 + free fp stack - st now is SQRT(R) again 668421C0 D9D0 FNOP 668421C2 DD01 FLD QWORD PTR DS:[ECX] // ecx is Z. equal to before... 668421C4 D9E1 FABS 668421C6 DC4D F8 FMUL QWORD PTR SS:[EBP-8] 668421C9 D9C1 FLD ST(1) 668421CB D9C9 FXCH ST(1) 668421CD D9F3 FPATAN 668421CF DD5D D8 FSTP QWORD PTR SS:[EBP-28] // save into room4 668421D2 D9D0 FNOP // okay now we have a,b,theta, phi, tango saved into the stack 668421D4 DD03 FLD QWORD PTR DS:[EBX] 668421D6 D8C8 FMUL ST,ST // x*x 668421D8 DC4D F0 FMUL QWORD PTR SS:[EBP-10] // b again 668421DB D9C1 FLD ST(1) // remember that sqrt(R) is still into the fpstack 668421DD D8C8 FMUL ST,ST // sqrt(R)*himself=R. 668421DF DEC1 FADDP ST(1),ST // R + b*x*x - stop, this is the power base 668421E1 DD47 F0 FLD QWORD PTR DS:[EDI-10] // N 668421E4 DC4F 08 FMUL QWORD PTR DS:[EDI+8] // N*0.5 because edi+8 is second constant 668421E7 D9C9 FXCH ST(1) // but we have to do base^exponent so swap! 668421E9 D9F1 FYL2X // fixed sequence for pow(x,y) 668421EB D9E8 FLD1 668421ED D9C1 FLD ST(1) 668421EF D9F8 FPREM 668421F1 D9F0 F2XM1 668421F3 DEC1 FADDP ST(1),ST 668421F5 D9FD FSCALE 668421F7 D9C9 FXCH ST(1) 668421F9 DDD8 FSTP ST // fixed sequence for pow(x,y) end 668421FB DD5D D0 FSTP QWORD PTR SS:[EBP-30] // saves into room for newx 668421FE D9D0 FNOP 66842200 DD45 E8 FLD QWORD PTR SS:[EBP-18] // theta 66842203 DC4F F0 FMUL QWORD PTR DS:[EDI-10] // * n 66842206 DC47 E0 FADD QWORD PTR DS:[EDI-20] // + phase 66842209 D9FF FCOS // cos( that stuff ) 6684220B DC4D D0 FMUL QWORD PTR SS:[EBP-30] // but multiply by newx 6684220E DD5D D0 FSTP QWORD PTR SS:[EBP-30] // and save into newx itself... 66842211 D9D0 FNOP // I know it's boring but we need to calculate also newy, newz. It's everything like before, with minimal 66842213 D9D0 FNOP // variations, different rooms / values, I copied and pasted barely. 66842215 DD02 FLD QWORD PTR DS:[EDX] 66842217 D8C8 FMUL ST,ST 66842219 DC4D F0 FMUL QWORD PTR SS:[EBP-10] 6684221C D9C1 FLD ST(1) 6684221E D8C8 FMUL ST,ST 66842220 DEC1 FADDP ST(1),ST 66842222 DD47 F0 FLD QWORD PTR DS:[EDI-10] 66842225 DC4F 08 FMUL QWORD PTR DS:[EDI+8] 66842228 D9C9 FXCH ST(1) 6684222A D9F1 FYL2X 6684222C D9E8 FLD1 6684222E D9C1 FLD ST(1) 66842230 D9F8 FPREM 66842232 D9F0 F2XM1 66842234 DEC1 FADDP ST(1),ST 66842236 D9FD FSCALE 66842238 D9C9 FXCH ST(1) 6684223A DDD8 FSTP ST 6684223C DD5D C8 FSTP QWORD PTR SS:[EBP-38] 6684223F D9D0 FNOP 66842241 DD45 E0 FLD QWORD PTR SS:[EBP-20] 66842244 DC4F F0 FMUL QWORD PTR DS:[EDI-10] 66842247 DC47 E0 FADD QWORD PTR DS:[EDI-20] 6684224A D9FF FCOS 6684224C DC4D C8 FMUL QWORD PTR SS:[EBP-38] 6684224F DD5D C8 FSTP QWORD PTR SS:[EBP-38] 66842252 D9D0 FNOP 66842254 D9D0 FNOP 66842256 DD01 FLD QWORD PTR DS:[ECX] 66842258 D8C8 FMUL ST,ST 6684225A DC4D F0 FMUL QWORD PTR SS:[EBP-10] 6684225D D9C1 FLD ST(1) 6684225F D8C8 FMUL ST,ST 66842261 DEC1 FADDP ST(1),ST 66842263 DD47 F0 FLD QWORD PTR DS:[EDI-10] 66842266 DC4F 08 FMUL QWORD PTR DS:[EDI+8] 66842269 D9C9 FXCH ST(1) 6684226B D9F1 FYL2X 6684226D D9E8 FLD1 6684226F D9C1 FLD ST(1) 66842271 D9F8 FPREM 66842273 D9F0 F2XM1 66842275 DEC1 FADDP ST(1),ST 66842277 D9FD FSCALE 66842279 D9C9 FXCH ST(1) 6684227B DDD8 FSTP ST 6684227D DD5D C0 FSTP QWORD PTR SS:[EBP-40] 66842280 D9D0 FNOP 66842282 DD45 E8 FLD QWORD PTR SS:[EBP-18] 66842285 DC4F F0 FMUL QWORD PTR DS:[EDI-10] 66842288 DC47 E0 FADD QWORD PTR DS:[EDI-20] 6684228B D9FF FCOS 6684228D DC4D C0 FMUL QWORD PTR SS:[EBP-40] 66842290 DD5D C0 FSTP QWORD PTR SS:[EBP-40] // FINISHED calculating newx, newy, newz 66842293 D9D0 FNOP // okay I haven't put the code for Julia variation because I only took care of mset 66842295 D9D0 FNOP // empty space... 66842297 D9D0 FNOP 66842299 D9D0 FNOP 6684229B DD45 D0 FLD QWORD PTR SS:[EBP-30] // room that contains newx. until now, ebx still contains old X. it's needed for Julia set. 6684229E DC46 18 FADD QWORD PTR DS:[ESI+18] // it is Cx, we add it 668422A1 DD1B FSTP QWORD PTR DS:[EBX] // finally save newx into X, okay 668422A3 90 NOP 668422A4 90 NOP 668422A5 DD45 C8 FLD QWORD PTR SS:[EBP-38] // same for newy. 668422A8 DC46 20 FADD QWORD PTR DS:[ESI+20] 668422AB DD1A FSTP QWORD PTR DS:[EDX] 668422AD 90 NOP 668422AE 90 NOP 668422AF DD45 C0 FLD QWORD PTR SS:[EBP-40] // same for newz. 668422B2 DC46 28 FADD QWORD PTR DS:[ESI+28] 668422B5 DD19 FSTP QWORD PTR DS:[ECX] 668422B7 90 NOP 668422B8 90 NOP 668422B9 DDD8 FSTP ST // but we left R into fp stack. this kills R. 668422BB 8BC3 MOV EAX,EBX // restore old registers. 668422BD 5F POP EDI // restore old registers. 668422BE 5E POP ESI // restore old registers. 668422BF 5B POP EBX // restore old registers. 668422C0 8BE5 MOV ESP,EBP // restore old registers. 668422C2 5D POP EBP // restore old registers. 668422C3 C2 0800 RETN 8 // goodbye!
|
No sweat, guardian of wisdom!
|
|
|
M Benesi
|
|
« Reply #13 on: March 14, 2011, 08:22:34 PM » |
|
Hey this can be the clue. MB sets always xyz to Cxyz, so this should be changed Have you inverted x and y before passing to atan? I don't think so, y is the flip() portion: atan2 (x + flip(y)) is the format (more or less atan (y/x)); Also, for your spiky object down there... looks like the magnitudes got switched from n/2 to 2/n (for the z^4 image, but it shouldn't matter for the z^2, because the magnitude would be the same!). r1, r2, and r3 must be set wrong... or something. Please don't work to hard on it- I'll get up the ChaosPro code later. Gotta get to my other work now (spent about 30 minutes on this that I shouldn't have ).
|
|
|
Logged
|
|
|
|
DarkBeam
Global Moderator
Fractal Senior
Posts: 2512
Fragments of the fractal -like the tip of it
|
|
« Reply #14 on: March 14, 2011, 08:58:49 PM » |
|
Also tried the "Julia mode", that fixes something BUT breaks something else! Tomorrow I will try to revert the magnitude, a FXCH reverts it. But I am not too hopeful!
|
No sweat, guardian of wisdom!
|
|
|
|