cKleinhuis
|
|
« on: October 04, 2010, 11:27:58 PM » |
|
hi all, i was just going to bed, when a new variant for triplex math came into my mind: 1. Use Spherical Representation of Point 2. Square ( or any other exponent ) the Distance 3. Now comes the new part, i was thinkering about gimbal lock problems when it comes to multiplicating the angles pair-wise, why not try something completely different ? why not treat the two angles to be a single (normalized) complex number, squaring this single complex number, and transform back to angles, by multipling with PI ? i have not viewed or tried it out yet, it just came to my mind and i wanted to shout it out i know it does not follow any rules, but could lead to funny results
|
|
|
Logged
|
---
divide and conquer - iterate and rule - chaos is No random!
|
|
|
bib
|
|
« Reply #1 on: October 05, 2010, 02:45:06 PM » |
|
Funny idea, and probably far from the holy grail, but let's see what our folks programmers will do with it
|
|
|
Logged
|
Between order and disorder reigns a delicious moment. (Paul Valéry)
|
|
|
Jesse
Download Section
Fractal Schemer
Posts: 1013
|
|
« Reply #2 on: October 06, 2010, 07:17:46 PM » |
|
Not bad at all, with some uncertainty of correct understanding Sample code: r := sqrt(rout); t1 := arctan2(y, x) / ascale; t2 := arcsin(z / r) / ascale; ipow2(t2, t1); sincosd(t2 * ascale, S1, C1); sincosd(t1 * ascale, S2, C2); x := rout * C1 * C2 + Cx; y := rout * S1 * C2 + Cy; z := rout * S2 + Cz; ascale is in the image sqrt(2), rout is the square of the length from the 3d vector. t2 and t1 is flipped because of nicer shapes, the downward and the upper tails were missing else. A video with vary scaling is uploading... Here it is:
http://vimeo.com/moogaloop.swf?clip_id=15602154&server=vimeo.com&fullscreen=1&show_title=1&show_byline=1&show_portrait=0&color=01AAEAThe scale varies from 6 down to 0.2
|
|
« Last Edit: October 07, 2010, 10:53:41 AM by Jesse »
|
Logged
|
|
|
|
cKleinhuis
|
|
« Reply #3 on: October 06, 2010, 09:19:00 PM » |
|
wow, cool shape, but i dunno if the formula is right, lets see:
why is t2 created through asining(z/r) shouldnt that be either z/x or z/y ?
is that complex multiplication in lines 2-6 ?
the last three lines are clearly for transforming back to cartesian coordinates
|
|
|
Logged
|
---
divide and conquer - iterate and rule - chaos is No random!
|
|
|
cKleinhuis
|
|
« Reply #4 on: October 06, 2010, 09:37:00 PM » |
|
the idea was to bypass singularity of the angle vectors, did you read this document, using quaternions for the calculation ? of adding 2 angles, you always get singularity problems.... have you studied this document, http://github.com/bonzini/mbulb/raw/master/mbulb.pdfthe date in the document is august 2010, so it updated regularly
|
|
|
Logged
|
---
divide and conquer - iterate and rule - chaos is No random!
|
|
|
Jesse
Download Section
Fractal Schemer
Posts: 1013
|
|
« Reply #5 on: October 06, 2010, 10:52:56 PM » |
|
This is from the sine triplex formula, arcsin(z/r) is here the angle in the z dimension, the rest from the vector would be sqrt(sqr(x)+sqr(y)). So the only difference is that i didnt multiplied the angles with 2, but did a complex power 2 function in ipow2(t2, t1); to change the angles. ipow2(x,y) is the common 2D mandelbrot function, but here without adding cx and cy of course. Yep, quaternions are used to avoid gimble lock, but the results with quaternions are well known i think... PS: the document is very good, i have to read it again in a quiet moment. One thing i have to test tomorrow, even if the result may not much vary: After squaring the angles they could or should be scaled back to the origin complex length...
|
|
« Last Edit: October 06, 2010, 11:47:49 PM by Jesse »
|
Logged
|
|
|
|
KRAFTWERK
|
|
« Reply #6 on: October 07, 2010, 12:01:57 PM » |
|
Cool idea and images Trifox/Jesse! Exciting!!!!
|
|
|
Logged
|
|
|
|
Jesse
Download Section
Fractal Schemer
Posts: 1013
|
|
« Reply #7 on: October 07, 2010, 09:40:18 PM » |
|
The rescaling did not lead to "nicer" results, i think a volumetric rendering would reveal the real structures much better, so i am limited by the results i get with m3d for a judgement... Some more results so far: A zoom into the minibulb in the lower tail: A julia of the power 2 version: Julia of a power 4 version: And an experiment with the parameters of the quaternion, maybe there is also room for further experiments:
|
|
|
Logged
|
|
|
|
Jesse
Download Section
Fractal Schemer
Posts: 1013
|
|
« Reply #8 on: October 08, 2010, 05:05:49 PM » |
|
Trifox, maybe you meant something different like Euler angles, where gimbal lock is an issue. With sperical coordinates you have only two angles like longitude and lattitude on a world map, here the angles are independent from each other and gimbal lock is not an issue.
I would like to try also Euler angles, but do not know exactly how i should transform the vector to 3 Euler angles in a simple way and what to do with these angles... ideas?
|
|
|
Logged
|
|
|
|
cKleinhuis
|
|
« Reply #9 on: October 08, 2010, 05:48:36 PM » |
|
in my point this is exactly where the quaternions come into play: a quaternion represents an orientation, it can be created from a 3d point, when normalized you have true orientation, represented in the i,j,k the question is what to make with this, i would say "adding" and then create a cartesian point out of the angle(s) defined in the quaternion using the multiplied length, as in the usual case of exponentiation so: x is cartesian coordinate r= length of point x q=quaternion representation of x's orientation ( normalized quaternion ) Operation: newquaternion=q+q Normalize(newquaternion) Transform "newquaternion" to cartesian, using r^2 as new length ( for 2 as exponent ... ) this would bring in 3 values into play
|
|
|
Logged
|
---
divide and conquer - iterate and rule - chaos is No random!
|
|
|
cKleinhuis
|
|
« Reply #10 on: October 08, 2010, 05:54:46 PM » |
|
quick note: it seem, the quaternion should rather be multiplied, than added, because it works like matrices multiplication, joining 2 transforms ....
|
|
|
Logged
|
---
divide and conquer - iterate and rule - chaos is No random!
|
|
|
Jesse
Download Section
Fractal Schemer
Posts: 1013
|
|
« Reply #11 on: October 08, 2010, 08:09:37 PM » |
|
Yes, multiplicated, else you would end up in the same q.
That is already made in the usual quaternion bulbs, so i would like to try euler angles just for fun, it would be interesting how a gimbal lock could maybe give interesting results. So when one angle change does not influence the result in certain places...
Edit: In "usual" quaternion bulbs like in m3d, the coordinates are directly interpreted as quaternion parameters, so your idea is to transform first from 3d cartesian to 4d quaternion as rotation expression, then multiplying and transform back, right?
Should this result in a standard bulb...?
|
|
« Last Edit: October 08, 2010, 08:15:10 PM by Jesse »
|
Logged
|
|
|
|
|
Paolo Bonzini
Guest
|
|
« Reply #13 on: October 23, 2010, 11:35:55 PM » |
|
Did something similar a long while back that I called type duh (because I realized the mistake I was making with the formula). Had the same basic branching form, although I nailed down the algorithm a bit to make it more squished
Looks beautiful, what's the formula for the duh?
|
|
|
Logged
|
|
|
|
M Benesi
|
|
« Reply #14 on: October 24, 2010, 07:58:35 PM » |
|
Hrmm.. type duh is renamed, under "mag vs. xyz" in my set (the "simplified" version) over at ChaosPro.de's formula database. I've had a lot of problems rendering this formula, basically I've noticed I have to set the resolution pretty high for it to detect "every" offshoot as it is a rather complicated fractal with lots of layers. Also, the variable checkvar can be manipulated, although the simplest variety is simply using the formula I provided below (there are lots of interesting things we can do with it). Getting up into the higher n (z^n) fractals, I've noticed a "smoothing" out of the fractal details. The fractal is really nice up until about z^5, then it starts smoothing out. I'll post a z^2 below the code, to show why Jesse's render reminded me of this one. here is the code: r=sqrt(sqr(sx)+sqr(sy)+sqr(sz)); //in all of my formulas, I use sx, sy, sz... as the starting variables of an iteration r2=r^n; // then use nx, ny, nz... as new values prior to adding in pixel/ julia components
checkvar=n*sqrt(2); // go ahead... I dare you... ask me why this works. I caution you: I will explain.
theta=atan2(abs(sx)*checkvar+flip(r)); //you don't have to do abs value... but it works better phi=atan2(abs(sy)*checkvar+flip(r)); //don't recall the specifics as this is an OLD formula.. but... tango=atan2(abs(sz)*checkvar+flip(r));
nx=r2*cos(theta*n); //here are those nx,ny... variables I mentioned earlier ny=r2*cos(phi*n); //next step is to add in pixel or Julia components... depending on what type of fractal nz=r2*cos(tango*n); // you're going for
Specifically the bottom left quadrant of this render has the same branching characteristics of Jesse's fractal. Now, if I recall correctly, when you DON'T apply checkvar to the calculations (or maybe just use sqrt(2) or something along those lines) you end up with something stretched out more like Jesse's one image (or maybe it's when you increase checkvar? I'm pretty sure it looks like Jesse's when you eliminate checkvar (set it to 1)).
|
|
|
Logged
|
|
|
|
|