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


« 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 cutdown 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




s31415


« 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


« 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: n = 2 ; exponent
;; for each iteration:
r_{xyz} = sqrt(Z_{x}^{2}+Z_{y}^{2}+Z_{z}^{2}) ; magnitude of entire vector r_{yz} = sqrt(Z_{y}^{2} + Z_{z}^{2}) ; magnitude of yz component of vector
theta = n*arccos(Z_{x}/r_{xyz}) phi = n*arccos(Z_{y}/r_{yz})
x = r_{xyz}^{n} * cos(theta) + C_{x} y = r_{xyz}^{n} * sin(theta) * cos(phi) + C_{y} z = r_{xyz}^{n} * sin(theta) * sin(phi) + C_{z}
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: i^{2} = 1 ; y axis j^{2} = 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: initialize Z = [0,0,0,0]
iterate:
Z_{nx} = Z_{x}^{2}  Z_{y}^{2}  Z_{z}^{2} + Z_{t}^{2} + C_{x} Z_{ny} = 2(Z_{x}Z_{y}  Z_{z}Z_{t}) + C_{y} Z_{nz} = 2(Z_{x}Z_{z}  Z_{y}Z_{t}) + C_{z} Z_{nt} = 2(Z_{x}Z_{t} + Z_{y}Z_{z})
For rendering and distance calculations, ignore Z _{t}That iteration formula represents Z ^{2} + 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: 163


« 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 4D 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 4D 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: Roundy: {x^{2}y^{2}z^{2}w^{2}, 2(xy+zw), 2(xz+yw), 2(xw+yz)} Squary: {x^{2}y^{2}z^{2}w^{2}, 2(xy+zw), 2(xz+yw), 2(xwyz)} Cousin: {x^{2}y^{2}z^{2}+w^{2}, 2(xy+zw), 2(xz+yw), 2(xw+yz)} Variation: {x^{2}y^{2}z^{2}w^{2}, 2(xy+zw), 2(xzyw), 2(xw+yz)} Ted's: {x^{2}y^{2}z^{2}+w^{2}, 2(xyzw), 2(xzyw), 2(xw+yz)}
Some of those quaternions were mandelbrotlike 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: The x term: x^{2}y^{2}z^{2}w^{2} roundy, squary, variation changes the w^{2} to +w^{2} : cousin, ted's
The y term: 2(xy+zw) : roundy, squary, cousin, variation 2(xyzw) : ted's
The z term: 2(xz+yw): roundy, squary, cousin 2(xzyw): variation, ted's
The w term: 2(xwyz): 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 » 




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 reread my post immediately above; I just added some information to it which should make it clear how it differs from the other quaternionesque mandels.



Logged




msltoe
Iterator
Posts: 163


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

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




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: i^{2} = 1 ; y axis j^{2} = 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: (a+bi+cj+dij)^{2} = a^{2}b^{2}c^{2}+d^{2}+2(abcd)i+2(acbd)j+2(ad+bc)ij
So, taking that as the basis, I came up with the following iteration: initialize Z = [0,0,0,0]
iterate:
Z_{nx} = Z_{x}^{2}  Z_{y}^{2}  Z_{z}^{2} + Z_{t}^{2} + C_{x} Z_{ny} = 2(Z_{x}Z_{y}  Z_{z}Z_{t}) + C_{y} Z_{nz} = 2(Z_{x}Z_{z}  Z_{y}Z_{t}) + C_{z} Z_{nt} = 2(Z_{x}Z_{t} + Z_{y}Z_{z})
For rendering and distance calculations, ignore Z _{t}That iteration formula represents Z ^{2} + 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 nonquaternion 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(xwyz) 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 pseudoquaternions 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: 163


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

Ted, Your welcome. Actually, I was thinking of sharing my rudimentary Linuxbased 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 3D mandelbrots.
Here's your second quaternion render:




msltoe
Iterator
Posts: 163


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

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




