Register to reply 
16 different spherical coordinate systems 
Share this thread: 
#19
Aug2609, 10:59 PM

P: 813

Let's look at coordinate system A: I gave the mappings: So for A [tex]x=r*x'[/tex] [tex]y=r*y'[/tex] [tex]z=\pm \sqrt{r^2((r \ x')^2+(r \ y')^2)}[/tex] [tex]r=sqrt(x^2+y^2+z^2)[/tex] [tex]x'=x/r[/tex] [tex]y'=y/r[/tex]  I'm going to change these to: So for A [tex]p_x=2*sqrt(r^2y^2)/r^2[/tex] [tex]p_y=2*sqrt(r^2x^2)/r^2[/tex] [tex]x=r*if(mod(x',2*p_x)<p_x \ , \ mod(x,p_x)0.5*p_x \ , \ (0.5 p_x  mod(x , p_x)) [/tex] [tex]y=r*if(mod(y',2*p_y)<p_y \ , \ mod(x,p_x)0.5*p_y \ , \ (0.5 p_x  mod(x , p_y))[/tex] [tex]z=\pm \sqrt{r^2((r \ x')^2+(r \ y')^2)}[/tex] [tex]r=sqrt(x^2+y^2+z^2)[/tex] [tex]x'=if(z>1,x/r+0.5*p_x \ , \ x/r+0.5*p_x \ , \ x/r + 1.5*p_x)[/tex] [tex]y'=if(z>1 / ,y/r+0.5*p_y \ , \ y/r+0.5*p_y \ , \ y/r + 1.5*p_y)[/tex] Where the front of the sphere is x in (0,px), y in (0,py) (px and py)<1 and the pack of the sphere is x in (px,2*px), y in (py,2*py) As far as I know, this should map you continuously around the sphere. 


#20
Aug3009, 04:58 PM

P: 117

http://www.skytopia.com/project/fractal/mandelbrot.html If you or anyone else have any insights on this, they would be appreciated. Ben, I see now what you mean by the 'coincident' problem, those lines you mentioned in G are indeed on top of each other, and that means you get ambiguity all along that line  I'm suddenly not so keen on system G now... However, correct me if I'm wrong, but for A & B, even though they share patches, they don't have the giant problem that G has. Here's another pic: As you can see, I've highlighted the problem with G (see green line), but A and B don't have coincident lines. John, thanks for the extra formulae (I'm still keen even if the systems aren't as 'pure' as I initially thought). I tried it out anyway, and something seems wrong  perhaps you could double check the vars (you missed out some quote marks, and I'm wondering if parts of the "y = r* ....." line uses x and px instead of y and py in places. I tried a couple of things, but no luck. 


#21
Aug3009, 06:21 PM

Sci Advisor
P: 1,594

Here's a random guess, but what happens if you use standard spherical coordinates, and try the map:
[tex](r \cos \phi \sin \theta, r \sin \phi \sin \theta, r \cos \theta) \rightarrow (r^2 \cos 2\phi \sin 2\theta, r^2 \sin 2\phi \sin 2\theta, r^2 \cos 2\theta) + (c_1, c_2, c_3)[/tex] where [itex]\theta[/itex] is the polar angle, and [itex]\phi[/itex] is the azimuthal angle. 


#22
Aug3009, 08:26 PM

P: 117

Hi Ben,
In fact, the nice raytraced (and globally illuminated) fractal you see from that article is almost identical apart from a few offsets (90 or 180 degrees on top of some of the rotations). For your interest, here is an orthographic render from one view without any offsets at all (lighter areas are closer): Since then I've tried hundreds of ideas out. None of them work (as in: none of them create the 'holy grail' that article speaks of). You can see now with this thread how I'm trying to exhaust all possible systems for spherical coords, before I either give up, or come back to try again in about 30 years time ;) It's been an interesting ride. At least now, I can see more of the beauty of the standard spherical coord system we all use. 


#23
Aug3009, 09:08 PM

P: 117

Here's the other views from your formulae, since the one above gives it less justice :)



#24
Aug3109, 08:11 PM

P: 4,512

btw, I'm somewhat perplexed by the search for spherical coordinate systems. Are you attempting to map the 2d mandelbrot set to the surface of a sphere? 


#25
Aug3109, 08:30 PM

P: 117

Yep I detailed the algorithm here:
http://www.fractalforums.com/3dfrac...g4109/#msg4109 For context, you may want to see the "My attempt to open Pandora's box..." section from here first. This guy has done some pretty good renders of the thing too (includes formulae too). 


#26
Aug3109, 09:32 PM

P: 4,512




#27
Aug3109, 10:01 PM

Sci Advisor
P: 1,594

You might have to get away from the "square and add" paradigm altogether to get what you want. And I don't think it will be useful to try to invent random kinds of spherical coordinate systems.



#28
Sep109, 02:01 PM

P: 117

Phrak, yeah I was trying to keep things strictly 3D, rather than moving to cross sections of 4D. I still hold out a little hope  hope you have more success than me anyway! :)



#29
Sep209, 08:38 PM

P: 4,512

1) double pi=3.14159265; 2) double r = sqrt(x*x + y*y + z*z ); 3) double yang = atan2(sqrt(x*x + y*y) , z ) ; 4) double zang = atan2(y , x); 5) newx = (r*r) * sin( yang*2 + 0.5*pi ) * cos(zang*2 +pi); 6) newy = (r*r) * sin( yang*2 + 0.5*pi ) * sin(zang*2 +pi); 7) newz = (r*r) * cos( yang*2 + 0.5*pi ); As a matter of artistic beauty in mathematics, I think we are looking for a third dimension that behaves in a way that y behave with respect to x. That is, Z is to Y as Y is to X. Or, as you have it Z is to sqrt(x*x+y*y) as Y is to X. This sort of idea is what I was once looking for by way of modified quarternions and matrices, and failed to find. Very nice! In line 3 the sign information of x and y is lost by taking the square root. The positive square root limits the return value from the atan2 function to two quadrants. Have you made any attempts at signing the square root? This appears to be why you are adding pi and 1/2 pi to your angles in 57. But I'm only guessing. What software are you using to generate your plots? I'm curious as to what the orbits look like. That is, are they helixes or do they bounce off the xy plane or skip pi radians every iteration? I have a notion concerning coordinate systems. It seems the natural coordinate system should be toroidal rather than spherical. There are no singularites and the angular coordinates remain orthagonal. Where the absolute divergent value is two, you would probable make the major radius of the torus equal to two. I can't see it allI don't fully understand it, but if this is it, you're 98% of the way there. 


#30
Sep309, 07:31 AM

P: 117

Well this thread seems to be taking a new direction :)
Do you think any of the spherical coord systems in my initial post on this thread may still be worth investigating, or do you think they're a dead end? I really wish I was 98% of the way to solving this, but that would be too good to be true. I'm not even 100% sure if the mathematical object even exists. But if it did, I think we'll be in for a shock in terms of how cool it would look, at least once zoomed in. In the mean time, had to share this: here's a neat version of the 3D brot recently created by Buddhi over at FractalForums: http://www.fractalforums.com/gallery/?sa=view;id=880 


#31
Sep309, 01:12 PM

Sci Advisor
P: 1,594

There is one thing that you should get straight, which you would know if you were more familiar with mathematics: The coordinate system used is almost entirely irrelevant.
I think you are focusing on the wrong part of the problem. It seems to me that you are just trying random modifications to your code, hoping that something will pop up that you like. I think you would be a lot better served if you were to step back and try to understand what you are actually doing, geometrically. Forget coordinate systems. What is happening geometrically? You had the right idea in your analysis of the 2D Mandelbrot (i.e., you take a vector, rotate it through by its own angle, square its length, and then add another constant vector). But I didn't see any similar sort of analysis for the 3D case. Now obviously, if you do exactly the same geometrical operations in 3D as you do in 2D, then you will just get a standard Mandelbrot set rotated around on its own axis. This is not what you want, of course. So now the question is, what needs to change, geometrically? The best thing to do would be to first think about the symmetry you expect your final object to have. I would guess you're expecting to get something whose basic shape is a 3D cardioid with a sphere attached at one end...so, that kind of shape has rotational symmetry around one axis. If you let this axis be the vertical axis, then I guarantee, the standard spherical coordinate system will be the most convenient way to describe the shape. (By the way, the standard spherical system uses the "colatitude", which is the angle measured down from the pole, rather than the latitude, which is the angle up from the equator...and believe me, the system is much simpler to use when you use the colatitude). The tricky thing now, is that you don't want perfect rotational symmetry, because that will just give you the 2D Mandelbrot rotated on its axis. Probably you want something with a discrete rotational symmetry group instead (i.e., something with 3fold rotational symmetry, or nfold, but not continuous rotational symmetry). This is not to hard to do, but most possibilities are going to give you the taffylike texture that you are trying to avoid. You should think about why this taffylike structure emerges, mathematically! (Hint: it has to do with continuity, and you can't make it go away just by choosing another coordinate system). I'm not sure yet exactly how to make the taffylike structure go away. I have a hunch it might involve elliptic functions (which are doublyperiodic in the complex plane). I do think you will have to get away from the "rotate, square, and add" paradigm altogether, because these operations all have continuities that will give you taffylike structure. Also, for reasons that I hope you have tried to learn about, you cannot define a consistent 3dimensional algebra analogous to the complex numbers that is algebraically closed. You can only define such algebras in 2^N dimensions. 


#32
Sep309, 01:41 PM

P: 117

Some of it is trial and error of course (or exhaustion of possibilities with certain parameters), though as you may have guessed, I've tried to think of the nearest analogue to the 2D mandelbrot, hence why I'm sticking with the square and add business. That is what's happening geometrically in the 2D version, and 3D can do similar things of course. Because of the extra dimension, there are a few ways to interpret the 2D version, and so it's far from clear what the 3D analgoue function should look like (perhaps even 3 rotations instead of 2 may be an idea, though that throws up its own can of worms). I even tried to think of a 1D representation of the mandelbrot to see what that may look like  that may be an avenue to explore, though the rotation bit won't exist at all then. I'm not so sure why you're semiconvinced something else would have to be done instead of the square/add idea, but it wouldn't surprise me too much if you turned out to be right. Anything's possible really. You're right that there's no proper 3D 'triplex' field (hence why I call them 'pseudo 3d' in the article), but with that in mind, I'm surprised we're even getting the taffy structure. I would've thought an empty black/white object, a massively smooth quaternionstyle object, or something with one or more sharp 'cross section' discontinuity errors would appear instead. Perhaps you seem to have a better understanding of what might be involved. If that's the case, then I say go for it yourself. Seriously, you'll be as famous as Mandelbrot himself if you cracked it :) 


#33
Sep309, 02:18 PM

Sci Advisor
P: 1,594

It might help if you read some articles about Euler angles, which are a system to describe arbitrary rotations in three dimensions (and which are intimately connected with CayleyKlein parameters, and quaternions, by the way). 


#34
Sep409, 09:11 AM

P: 117

Start = green, rotate1 = yellow, finish = red. Of course, both systems are different here. See how each line (for example, the green one) is not really 1 rotation (which would produce trivial and uninteresting results, as in combination with the yellow line, would only traverse a great circle), but instead is 2 rotations along different planes (maybe I should have said that previously?). This one is of the whole thing: http://www.bugman123.com/Hypercomple...ite8large.jpg This is a zoomed in version (*22 magnification, but the 'voxel' resolution is fairly low), lighting is plain here: http://www.fractalforums.com/gallery...09_9_25_55.png This shows more of the potential, despite the plain diffuse lighting again. magnification= *1284. Notice the romanesco broccoli type effect! http://www.fractalforums.com/gallery...9_12_01_24.png Maybe Phrak was right after all with his 98% guess. More renders from the fractalforum guys are forthcoming over the next days (can't wait :) ). This is a first afaik. 


#35
Sep409, 08:49 PM

P: 4,512

Is that one of your algorithms, Twinbee? I'd like to see the algorithm if it's available.
Re: using atan2 to obtain the latitudinal angle. But there may be a way around this. The orbits for your 3D mandelbrot trace a pattern on the surface of a sphere (I think), and the sphere will be shrinking or expanding, as you've pointed out. From previous points of the orbit, you may be able to obtain 'angular momentum' information that will tell you in which octant on the sphere the next iteration should appear. Re: toroidal coordinates. 


#36
Sep509, 12:09 AM

P: 813




Register to reply 
Related Discussions  
Coordinate systems for divergence  Calculus & Beyond Homework  0  
Coordinate Systems  Calculus & Beyond Homework  1  
Conversion Between Coordinate Systems  Calculus & Beyond Homework  7  
Converting between coordinate systems?  Calculus & Beyond Homework  3  
Vectors and Coordinate Systems  Calculus & Beyond Homework  1 