Logo by Pauldelbrot - 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: Visit us on facebook
 
*
Welcome, Guest. Please login or register. March 29, 2024, 02:25:07 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] 2 3   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: Has anyone tried this formula?  (Read 14839 times)
0 Members and 1 Guest are viewing this topic.
TedWalther
Guest
« on: November 26, 2009, 05:10:24 AM »

I will describe the algorithm in geometric terms.

The mandelbulb is based on doing the following:

basis vectors x = [1,0,0] y = [0,1,0] z = [0,0,1]
Take a 3d vector Z
rotate Z around z axis
rotate Z around x axis
double magnitude of Z
add a constant vector C

I believe it can be improved with this one small difference.  After the vector is rotated around the x axis, then also rotate the z axis by the same amount so that z, Z, and x are always in the same plane.

This way, a fresh new z axis is used in every iteration. The z axis will always be in the zy plane.

This produces the mandelbrot set for all Z,C pairs that are in the xy plane.  I believe this is the missing refinement to get a true 3d mandelbrot set.

Ted
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #1 on: November 26, 2009, 03:55:15 PM »

I will describe the algorithm in geometric terms.

The mandelbulb is based on doing the following:

basis vectors x = [1,0,0] y = [0,1,0] z = [0,0,1]
Take a 3d vector Z
rotate Z around z axis
rotate Z around x axis
double magnitude of Z
add a constant vector C

I believe it can be improved with this one small difference.  After the vector is rotated around the x axis, then also rotate the z axis by the same amount so that z, Z, and x are always in the same plane.

This way, a fresh new z axis is used in every iteration. The z axis will always be in the zy plane.

This produces the mandelbrot set for all Z,C pairs that are in the xy plane.  I believe this is the missing refinement to get a true 3d mandelbrot set.

Ted

When you say "rotate Z around z axis" and "rotate Z around x axis", by which angles do you mean exactly ?
I assume for the first you mean atan2(x,y) (or should that be atan2(y,x) - it's a long time since I did it in C), but which angle do you mean for the rotation around the x axis ?
Also I suspect the result of what you suggest may just be the cut-down quaternionic version of the Mandy.

Also "This produces the Mandelbrot Set for all Z,C pairs that are in the xy plane.".....so does the Mandelbulb (sine version), it just doesn't do so for the xz plane.
« Last Edit: November 26, 2009, 04:01:06 PM by David Makin » Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
s31415
Conqueror
*******
Posts: 110



WWW
« Reply #2 on: November 26, 2009, 04:40:20 PM »

I will describe the algorithm in geometric terms.

The mandelbulb is based on doing the following:

basis vectors x = [1,0,0] y = [0,1,0] z = [0,0,1]
Take a 3d vector Z
rotate Z around z axis
rotate Z around x axis
double magnitude of Z
add a constant vector C

You don't double the magnitude of Z, you square it. As pointed out in the previous comment, it's not clear what you mean by "rotating around the z or x axis".
« Last Edit: November 26, 2009, 04:43:10 PM by s31415 » Logged

twinbee
Fractal Fertilizer
*****
Posts: 383



WWW
« Reply #3 on: November 26, 2009, 04:54:53 PM »

Ted, if I understand you correctly, are you saying that as the angle approaches the poles (singularities), the distance travelled will be proportionally much greater, so as to obtain the same spherical distance as travelled around theta (even if it means going round in circles a lot near the poles)? If this is the case, directly at the north/south poles, infinite 'rotations' around phi will take place in theory. Is this correct?

If you do mean that, then I have tried that already, without success. However, it may be worth trying again, in case I made a math slip up.

Good thinking in any case.
« Last Edit: November 26, 2009, 06:27:04 PM by twinbee » Logged
TedWalther
Guest
« Reply #4 on: November 26, 2009, 08:40:38 PM »

Ted, if I understand you correctly, are you saying that as the angle approaches the poles (singularities), the distance travelled will be proportionally much greater, so as to obtain the same spherical distance as travelled around theta (even if it means going round in circles a lot at the poles)? If this is the case, at the north/south pole, infinite 'rotations' will take place in theory. Is this correct?

If you do mean that, then I have tried that already, without success. However, it may be worth trying again, in case I made a math slip up.

Good thinking in any case.

I'm not sure I explained myself clearly; its been a while.  I'll have another go at it:

Quote
n = 2 ; exponent

;; for each iteration:

rxyz = sqrt(Zx2+Zy2+Zz2)  ; magnitude of entire vector
ryz = sqrt(Zy2 + Zz2) ; magnitude of yz component of vector

theta = n*arccos(Zx/rxyz)
phi = n*arccos(Zy/ryz)

x = rxyzn * cos(theta) + Cx
y = rxyzn * sin(theta) * cos(phi) + Cy
z = rxyzn * sin(theta) * sin(phi) + Cz

My math is rusty, so if I got that wrong, please be patient.

To put it into words again:

Take the point Z.  It has x,y,z components.  Except when Z is colinear with [1,0,0] (the x axis, I will call it X), Z and X together always define a plane.  Rotate Z in that plane.  Then ignore the x component of Z, and when the [y,z] subset of Z is not colinear with the y axis [0,1,0] (which I call Y), then rotate just the [y,z] subset in the yz plane, using the y axis itself as the zero angle.

Has this already been tried?

Oh, about the north and south poles... When Z is colinear with X, it shouldn't rotate at all.  When the y,z components of Z are colinear with Y, there is no rotation in the yz plane.  So, yes, near the poles the points should rotate quite quickly, but when they get to zero there should be no rotation at all.

Ted
« Last Edit: November 26, 2009, 09:23:02 PM by TedWalther, Reason: accidentally put sin(theta) when I meant sin(phi) » Logged
TedWalther
Guest
« Reply #5 on: November 26, 2009, 09:09:37 PM »

I came up with another possibility, based on extending imaginary numbers.  Instead of the quaternion identity ijk, I based it on this identity:

Quote
i2 = -1 ; y axis
j2 = -1 ; z axis
ij = ji ; little bit that isn't represented graphically but just hangs around to take part in calculations

So, taking that as the basis, I came up with the following iteration:

Quote
initialize
Z = [0,0,0,0]

iterate:

Znx = Zx2 - Zy2 - Zz2 + Zt2 + Cx
Zny = 2(ZxZy - ZzZt) + Cy
Znz = 2(ZxZz - ZyZt) + Cz
Znt = 2(ZxZt + ZyZz)

For rendering and distance calculations, ignore Zt

That iteration formula represents Z2 + C for the given definitions of i and j.

Are there any images of that kicking around?
« Last Edit: November 27, 2009, 02:21:09 AM by TedWalther, Reason: correcting signedness error in the w term » Logged
msltoe
Iterator
*
Posts: 187


« Reply #6 on: November 26, 2009, 11:56:42 PM »

Ted,

 Paul Nylander does a very good job on his web site showing some of the different variations of the 4-D quaternion "mandelbrot" sets. I think the last one you suggested is on there.

http://www.bugman123.com/Hypercomplex

 Unfortunately, none of the quaternion variations that people have looked at so far produce anything as exciting as the Mandelbulb.

-mike
Logged
TedWalther
Guest
« Reply #7 on: November 27, 2009, 01:15:50 AM »

Ted,

 Paul Nylander does a very good job on his web site showing some of the different variations of the 4-D quaternion "mandelbrot" sets. I think the last one you suggested is on there.

http://www.bugman123.com/Hypercomplex

 Unfortunately, none of the quaternion variations that people have looked at so far produce anything as exciting as the Mandelbulb.

-mike

Thanks Mike.

I was just looking at it now; there are several that are similar to mine, but the difference is in whether the terms are added or subtracted.  Specifically, the 4d "roundy" and "squary" mandelbrots are similar in formula, but the terms are added and subtracted differently from mine.  I don't know how the roundy and squary formulas were derived; my formula was derived from treating j and i as types that behave in the same way but don't interact with each other.  Just changing the signedness of a couple terms was enough to convert a roundy to a squary; just two or three more terms need their signedness changed to match my formula; who knows what it will turn out to look like?

Here is the differences:

Quote
Roundy: {x2-y2-z2-w2, 2(xy+zw), 2(xz+yw), 2(xw+yz)}
Squary: {x2-y2-z2-w2, 2(xy+zw), 2(xz+yw), 2(xw-yz)}
Cousin: {x2-y2-z2+w2, 2(xy+zw), 2(xz+yw), 2(xw+yz)}
Variation:  {x2-y2-z2-w2, 2(xy+zw), 2(xz-yw), 2(xw+yz)}
Ted's: {x2-y2-z2+w2, 2(xy-zw), 2(xz-yw), 2(xw+yz)}

Some of those quaternions were mandelbrot-like enough to make me excited, and I anxiously await for someone else to be curious enough to render and post images of my variation.

To summarize:

Quote
The x term:
x2-y2-z2-w2 roundy, squary, variation
changes the -w2  to +w2 : cousin, ted's

The y term:
2(xy+zw) : roundy, squary, cousin, variation
2(xy-zw) : ted's

The z term:
2(xz+yw): roundy, squary, cousin
2(xz-yw): variation, ted's

The w term:
2(xw-yz): squary
2(xw+yz): roundy, cousin, variation, ted's

Roundy different in 3 terms, Squary different in 4 terms, Cousin different in 2 terms, Variation different in 2 terms.

Ted
« Last Edit: November 27, 2009, 02:14:43 AM by TedWalther, Reason: Correcting the w term; signedness error. » Logged
dougfractal
Guest
« Reply #8 on: November 27, 2009, 01:30:33 AM »

This is my formula



Also expandable to multi-dimensions.




3D
<a href="http://www.youtube.com/v/fXFz2x7jUro&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/fXFz2x7jUro&rel=1&fs=1&hd=1</a>

4D
<a href="http://www.youtube.com/v/eS7qCfttmBk&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/eS7qCfttmBk&rel=1&fs=1&hd=1</a>


Logged
TedWalther
Guest
« Reply #9 on: November 27, 2009, 01:39:04 AM »

Thanks dougfractal, that looks intriguing.  Can you post the formula?  Also, can you re-read my post immediately above; I just added some information to it which should make it clear how it differs from the other quaternion-esque mandels.
Logged
msltoe
Iterator
*
Posts: 187


« Reply #10 on: November 27, 2009, 01:41:48 AM »

Ted: Here's a quick rendering of your quaternion formula:
 


* ted.png (160.32 KB, 600x600 - viewed 648 times.)
Logged
TedWalther
Guest
« Reply #11 on: November 27, 2009, 01:48:40 AM »

I came up with another possibility, based on extending imaginary numbers.  Instead of the quaternion identity ijk, I based it on this identity:

Quote
i2 = -1 ; y axis
j2 = -1 ; z axis
ij = ji ; little bit that isn't represented graphically but just hangs around to take part in calculations

The result of squaring a number that involves i and j using these rules:

Quote
(a+bi+cj+dij)2 = a2-b2-c2+d2+2(ab-cd)i+2(ac-bd)j+2(ad+bc)ij

So, taking that as the basis, I came up with the following iteration:

Quote
initialize
Z = [0,0,0,0]

iterate:

Znx = Zx2 - Zy2 - Zz2 + Zt2 + Cx
Zny = 2(ZxZy - ZzZt) + Cy
Znz = 2(ZxZz - ZyZt) + Cz
Znt = 2(ZxZt + ZyZz)

For rendering and distance calculations, ignore Zt

That iteration formula represents Z2 + C for the given definitions of i and j.

THANK YOU MIKE for publishing that image.  Best Thanksgiving gift ever!  Very exciting.  Wish there was linux software that could do these renders.  At that level it does look like there are a lot of smooth areas.  But for symmetry, it looks pretty much like what I expect a 3d mandelbrot to look like.  Now if I could only get a look at the first fractal, the non-quaternion one, with the sines and cosines.
« Last Edit: November 27, 2009, 02:01:07 AM by TedWalther, Reason: mistook sign for w term » Logged
TedWalther
Guest
« Reply #12 on: November 27, 2009, 02:02:43 AM »

Mike, I checked my notes, and I made a mistake in the w term; can you try again with 2(xw-yz) changed to 2(xw+yz) ?  In case you look, I have already made correction to my previous previous posts.

Also, in the post above, I accidentally repeated material from a previous post, but I added in the expansion of the square of the pseudo-quaternions I've been using, this should make it easier to see how I got the iteration formula.

Ted
« Last Edit: November 27, 2009, 02:19:41 AM by TedWalther » Logged
msltoe
Iterator
*
Posts: 187


« Reply #13 on: November 27, 2009, 02:43:22 AM »

Ted,
 
 Your welcome. Actually, I was thinking of sharing my rudimentary Linux-based C renderer with everyone which I've been working on for the past two weeks as I've been feverishly looking for the holy grail of 3-D mandelbrots.

Here's your second quaternion render:
 


* ted2.png (120.98 KB, 600x600 - viewed 648 times.)
Logged
msltoe
Iterator
*
Posts: 187


« Reply #14 on: November 27, 2009, 03:00:55 AM »

Ted,


 Here's your first one in 2nd order. The 8-th order looks like a typical 8th-order Mandelbulb. There's something about those Higher Powers...


* ted4.png (170.57 KB, 600x600 - viewed 649 times.)
Logged
Pages: [1] 2 3   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
@jesse - save formula as new formula ?! feature request cKleinhuis 0 4906 Last post October 10, 2012, 05:43:14 PM
by cKleinhuis
Could Pi be considered a fractal? General Discussion « 1 2 3 » Chillheimer 44 28637 Last post August 22, 2017, 04:17:38 AM
by greentexas
Formula Tab Swap feature request 0Encrypted0 0 5175 Last post March 28, 2015, 10:37:14 PM
by 0Encrypted0
All Mandelbulb3Dv189x2 formula descriptions Tutorials 1Bryan1 5 6307 Last post October 27, 2015, 08:29:38 PM
by M Benesi
how to read a m3p formula Mandelbulb 3d dyol 7 4875 Last post December 23, 2015, 04:55:40 PM
by dyol

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.252 seconds with 29 queries. (Pretty URLs adds 0.011s, 2q)