Logo by Fiery - 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. April 20, 2024, 02:08:28 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: Triplex Variant - Spherical + Complex  (Read 4379 times)
0 Members and 1 Guest are viewing this topic.
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« 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 cheesy
i know it does not follow any rules, but could lead to funny results cheesy
 afro afro afro
Logged

---

divide and conquer - iterate and rule - chaos is No random!
bib
Global Moderator
Fractal Senior
******
Posts: 2070


At the borders...


100008697663777 @bib993
WWW
« 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 smiley
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  smiley

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:

<a href="http://vimeo.com/moogaloop.swf?clip_id=15602154&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA" target="_blank">http://vimeo.com/moogaloop.swf?clip_id=15602154&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA</a>

The scale varies from 6 down to 0.2
« Last Edit: October 07, 2010, 10:53:41 AM by Jesse » Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« 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
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« 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.pdf

the date in the document is august 2010, so it updated regularly wink

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...
 cheesy

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
Global Moderator
Fractal Senior
******
Posts: 1439


Virtual Surreality


WWW
« Reply #6 on: October 07, 2010, 12:01:57 PM »

Cool idea and images Trifox/Jesse!
Exciting!!!!  afro
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
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« 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 cheesy
Logged

---

divide and conquer - iterate and rule - chaos is No random!
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« 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
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #12 on: October 22, 2010, 10:10:54 AM »

 
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:

 
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? smiley
Logged
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« 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:
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

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.178 seconds with 26 queries. (Pretty URLs adds 0.014s, 2q)