DarkBeam
Global Moderator
Fractal Senior
Posts: 2512
Fragments of the fractal -like the tip of it
|
|
« Reply #15 on: December 23, 2011, 12:13:52 PM » |
|
Found the right simplification!!! It is; acos(y/sqrt(r)) = atan2(sqrt(x*x+z*z),y) // used in Inigo Q. bulb asin(z/sqrt(r)) = 1.5707 - atan2(sqrt(x*x+y*y),z) // used in standard Mandelbulb Alternative; asin(z/sqrt(r)) = atan2(z,sqrt(x*x+y*y))
I can do the formula in both flavours, baby. Also found a workaround for arctan() and atan2(). atan(m/n) = atan2(m,n) if n>0. However; atan(m/n) = atan2(m,abs(n))*sign(n) always
|
|
« Last Edit: December 23, 2011, 05:44:20 PM by DarkBeam »
|
Logged
|
No sweat, guardian of wisdom!
|
|
|
Aexion
|
|
« Reply #16 on: December 23, 2011, 01:46:25 PM » |
|
Found the right simplification!!! It is; acos(y/sqrt(r)) = atan2(sqrt(x*x+z*z),y) // used in Inigo Q. bulb asin(z/sqrt(r)) = 1.5707 - atan2(sqrt(x*x+y*y),z) // used in standard MandelbulbI can do the formula in both flavours, baby. Also found a workaround for arctan() and atan2(). atan(m/n) = atan2(m,n) if n>0. However; atan(m/n) = atan2(m,abs(n))*sign(n) alwaysNice.. here is another experiment: In the Mandelbox, change the C (cx,cy,cz) for: rc=sqrt(cx*cx+cy*cy+cz*cz);
iteration.. const float theta1 = atan2(sqrt(cx*cx + cz*cz) , cy)+0.78539816339744830961566084581988; const float phi1 = atan2(cz,cx)+0.78539816339744830961566084581988; const float sintheta1=rc * sin(theta1); cx = sintheta1 * cos(phi1); cz = sintheta1 * sin(phi1); cy = rc * cos(theta1);
Unlike the mandelbulb version, this one add an small angle to the C value every iteration, in this case pi/4.. There's a big difference between rotating C after or before the Mandelbox transformation. One of them gives to the mandelbox a rotated Rubik Cube look..
|
|
|
Logged
|
| Fractals all the way.. Incendia for 3D Fractals Aural for Musical Fractals |
|
|
|
DarkBeam
Global Moderator
Fractal Senior
Posts: 2512
Fragments of the fractal -like the tip of it
|
|
« Reply #17 on: December 23, 2011, 05:15:07 PM » |
|
Keeping in mind that atan, acos, asin are equivalent of atan2 of modified arguments, and considering more untried variations, I am thinking of a very general customizable Mandelbulb formula. The formula has this form; (user params are bold) // --- universal Mandelbulb formula --- // optional; do here abs(x), abs(y), abs(z) to get Benesi-like formulas ...
// check for args of th, and load them // check if atan tweak is ON and modify args accordingly th := atanmul * power * atan2(args) // Formula with power of angle different than the power of r is not good... // put tweaks of th here
// check for args of ph, and load them // check if atan tweak is ON and modify args accordingly ph := atanmul * zangp * atan2(args) // put tweaks of ph here sq_r := sqrt(x*x+y*y+z*z) r:= sq_r ^ power x = r*cos(th)*cos(ph) + Cx y = r*sin(th)*cos(ph) + Cy z = r*sin(ph)*zmul + CzThe tweak consists of different choices for the atan2 args. Let us define the functions h(a,b) = hypot(a,b) = sqrt(a*a+b*b) u(a,b) = max(abs(a),abs(b)) d(a,b) = min(abs(a),abs(b))Tweaks; a) atan tweak; The sign of the "signed" (or the first, for variants of type 1) argument is not considered, then atanmul = sgn(argument)b) xenodream tweak; (used in the Xenodream variant, after the calculation of atan2() do this correction) if (angle > 0.5 * M_PI) { angle = M_PI - angle;} else if (angle < -0.5 * M_PI) { ph = -M_PI - angle;} Args; 1) x,y // x,z // y,x // y,z // z,x // z,y (normal variables). 2) x, h(y,z) // y, h(x,z) // z, h(x,y) // and the previous args in reversed order. (simulation of arcsin(), arccos() functions). 3) x, u(y,z) // y, u(x,z) // z, u(x,y) // and the previous args in reversed order. (the "cubic distance" instead of the euclidean one). 4) x, d(y,z) // y, d(x,z) // z, d(x,y) // and the previous args in reversed order. (alternate "cubic distance"). This should cover every possible Mandelbulb variation EXCEPT for rotations OR abs(x) thingmajigs. (total of 6x4x4 variants for EACH angle considered, WITHOUT considering 4 dimensional bulbs.)
|
|
« Last Edit: December 23, 2011, 07:21:26 PM 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 #18 on: December 23, 2011, 10:44:03 PM » |
|
I have done the formula but it needs more refinement, see tomorrow From that formula it's straightforward the Aexion C mangling
|
|
|
Logged
|
No sweat, guardian of wisdom!
|
|
|
Jesse
Download Section
Fractal Schemer
Posts: 1013
|
|
« Reply #19 on: December 23, 2011, 11:30:59 PM » |
|
Made some testings, but the possibilities are big, so this needs further exploration. I guess the first image shows more or less the same as your first result with rotated C, only that you stopped at max iterations and my image was at a certain distance with more iterations at the spikes. Not really sure but this is one i had those spikes, it was without the negation of the atan2's. The second (attached) image was an experiment of doing the C rotation based on the difference of the vectors Z and C. Maybe i did the rotation on C also with a different coordinate system orientation. A kind of interaction between those vectors seems a not that bad idea to me...?
|
|
« Last Edit: December 23, 2011, 11:34:16 PM by Jesse »
|
Logged
|
|
|
|
Aexion
|
|
« Reply #20 on: December 24, 2011, 12:40:34 AM » |
|
Made some testings, but the possibilities are big, so this needs further exploration.
I guess the first image shows more or less the same as your first result with rotated C, only that you stopped at max iterations and my image was at a certain distance with more iterations at the spikes. Not really sure but this is one i had those spikes, it was without the negation of the atan2's.
The second (attached) image was an experiment of doing the C rotation based on the difference of the vectors Z and C. Maybe i did the rotation on C also with a different coordinate system orientation.
A kind of interaction between those vectors seems a not that bad idea to me...?
Beautiful renders Jesse, and you're right, this needs more exploration! And yes, in my first image, I didn't negated the atan2.. It was in the second image on where I negated it (as an experiment suggested by eiffie) Some sections of the first image reminds me the decoration of the Mayan Stela's, while the second looks like the Brain Coral: http://en.wikipedia.org/wiki/Brain_coralps. Do not mention that the first set looks like the Mayan Calendar in many places, because finding such calendar in a fractal, near 2012 will cause a large amount of end of the world news..
|
|
« Last Edit: December 24, 2011, 01:33:51 AM by Aexion »
|
Logged
|
| Fractals all the way.. Incendia for 3D Fractals Aural for Musical Fractals |
|
|
|
Jesse
Download Section
Fractal Schemer
Posts: 1013
|
|
« Reply #21 on: December 24, 2011, 03:22:08 PM » |
|
Beautiful renders Jesse, and you're right, this needs more exploration! And yes, in my first image, I didn't negated the atan2.. It was in the second image on where I negated it (as an experiment suggested by eiffie) Some sections of the first image reminds me the decoration of the Mayan Stela's, while the second looks like the Brain Coral: http://en.wikipedia.org/wiki/Brain_coralThe brain coral reminds me of an selforganizating cell automata (dunno if this is a correct name for it) that produces same structures, have to see if i can find the program. ps. Do not mention that the first set looks like the Mayan Calendar in many places, because finding such calendar in a fractal, near 2012 will cause a large amount of end of the world news.. No prob, the Mayan Calendar mythos can be easily falsificated by some bits of information. Merry christmas, attached a test with the amount of C rotation mutliplied by euclidian distance of the vecs...
|
|
|
Logged
|
|
|
|
Aexion
|
|
« Reply #22 on: December 25, 2011, 11:38:52 AM » |
|
Merry christmas, attached a test with the amount of C rotation mutliplied by euclidian distance of the vecs...
Merry Christmas for you too Jesse!! Great Render!! The shapes and the lights are incredible! I like it. One interesting feature hat I have noted, is the fact that if you run C on conditionals, the fractal doesn't show discontinuity, but interesting structures appears.. For example: const float theta1 = atan2(sqrt(cx*cx + cz*cz) , cy)*8; const float phi1 =(x>0)?atan2(cz,cx)*8:-atan2(cz,cx)*8;
Try it..
|
|
« Last Edit: December 25, 2011, 11:42:12 AM by Aexion »
|
Logged
|
| Fractals all the way.. Incendia for 3D Fractals Aural for Musical Fractals |
|
|
|
DarkBeam
Global Moderator
Fractal Senior
Posts: 2512
Fragments of the fractal -like the tip of it
|
|
« Reply #23 on: December 25, 2011, 12:07:10 PM » |
|
Ramiro this concept is similar to XenoDream's angular fold; double rp = pow(r, p); double th = atan2(z.y, z.x); double ph = acos(z.z / r); if (ph > 0.5 * M_PI) { ph = M_PI - ph; } else if (ph < -0.5 * M_PI) { ph = -M_PI - ph; } z.x = rp * cos(th * p) * sin(ph * p); z.y = rp * sin(th * p) * sin(ph * p); z.z = rp * cos(ph * p); z = z + constant; r = z.Length();
|
|
|
Logged
|
No sweat, guardian of wisdom!
|
|
|
DarkBeam
Global Moderator
Fractal Senior
Posts: 2512
Fragments of the fractal -like the tip of it
|
|
« Reply #24 on: December 25, 2011, 01:25:49 PM » |
|
|
No sweat, guardian of wisdom!
|
|
|
Aexion
|
|
« Reply #25 on: December 26, 2011, 02:30:56 AM » |
|
Ramiro this concept is similar to XenoDream's angular fold; double rp = pow(r, p); double th = atan2(z.y, z.x); double ph = acos(z.z / r); if (ph > 0.5 * M_PI) { ph = M_PI - ph; } else if (ph < -0.5 * M_PI) { ph = -M_PI - ph; } z.x = rp * cos(th * p) * sin(ph * p); z.y = rp * sin(th * p) * sin(ph * p); z.z = rp * cos(ph * p); z = z + constant; r = z.Length(); Actually the formulas was for a dynamic rotation of 'C' while iterating, rather for a fixed 'C' iteration... Here's the function: bool MBulbCr(float x, float y, float z,int miter){ int Counter; float ctx=x; float cty=y; float ctz=z; const float rc = sqrt(ctx*ctx + cty*cty + ctz*ctz); for(Counter=0;Counter<miter;Counter++){ const float r = sqrt(x*x + y*y + z*z); const float theta = atan2(sqrt(x*x + z*z) , y)*8; const float phi = atan2(z,x)*8; const float r2=r*r*r*r; const float r1=r2*r2; const float sintheta=r1 * cos(theta); x = sintheta * cos(phi)+ctx; y = sintheta * sin(phi)+cty; z = r1 * sin(theta)+ctz; const float theta1 = atan2(sqrt(ctx*ctx + ctz*ctz) , cty)*8; const float phi1 =(x>0)?atan2(ctz,ctx)*8:-atan2(ctz,ctx)*8; const float sintheta1=rc * cos(theta1); ctx = sintheta1 * cos(phi1); cty = sintheta1 * sin(phi1); ctz = rc * sin(theta1); if (r>4) break; } if(Counter<miter)return true;else return false; }
If you iterate the system with this conditional, it will looks like: The field is open for many other combinations of rules (IFS?).. Good luck!
|
|
« Last Edit: December 26, 2011, 02:50:38 AM by Aexion »
|
Logged
|
| Fractals all the way.. Incendia for 3D Fractals Aural for Musical Fractals |
|
|
|
DarkBeam
Global Moderator
Fractal Senior
Posts: 2512
Fragments of the fractal -like the tip of it
|
|
« Reply #26 on: December 26, 2011, 07:38:46 PM » |
|
|
|
« Last Edit: December 27, 2011, 05:02:56 PM by DarkBeam »
|
Logged
|
No sweat, guardian of wisdom!
|
|
|
willclark218
Forums Freshman
Posts: 11
|
|
« Reply #27 on: February 09, 2013, 07:43:10 PM » |
|
your English is damn good ... better than most Americans.. ... greta post
|
|
|
Logged
|
|
|
|
|