16 different spherical coordinate systems

In summary: G then the less fancy way is to use the standard spherical coords formulae but for the azimuth, use this formula instead:azimuth=atan2(y,x)-atan2(sin(y')*z,cos(y')*sqrt(x*x+y*y))My preference is also that the formulae would be in the same order as the other ones (i.e. radius first, then elevation, then azimuth), but if you could put the radius in first instead for the two systems that don't have the azimuth as the first number, then that would be great. So my preference is to have the formulae in the order:radius, elevation, azimuthIn summary, the conversation is discussing different spherical coordinate systems
  • #1
Twinbee
117
0
I've tabulated 16 possible ways of creating different spherical coord systems, and attached an image below to demonstrate them all. They are all spheres, though the coordinate system is different for each one. Assume an orthographic projection.

Some are blanked out, since they are similar to the others but simply rotated, so essentially, there are 10 systems really in total.

System "I" is the one in common use, used for the geographical coord system (and effectively a rotation of the standard spherical coord system). For that one, all of the 'curved' vertical lines meet at the north and south pole (creating a terry's chocolate orange type effect), whilst all the straight horizontal lines are parallel with each other. On the other hand, something like system "G", has 4 of these points where all the lines meet (west and east sides, as well as the 2 usual north and south poles).

What I want to know is do some of the other nine systems have special names too (and what are they?). And why does (the rotated version of) system 'I' get exclusive access to the name of "spherical coords", when some of the others look just as interesting and useful (particularly systems A, B, D, and G which are more 'symmetric') ?

http://www.skytopia.com/stuff/sphere4.png
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
Why do you want to pay somebody for the solutions? Is this a homework assignment?

Anyway, A is trivial. It already IS in cartesian coordinates. Just use the equation of a sphere

[tex]x^2 + y^2 + z^2 = r^2[/tex]

and solve for x.
 
  • #3
I'm going to presume they all have a radial coordinate.

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]

For B

[tex]x=r*sin(x') \ \ -\pi<x'<\pi[/tex]
[tex]y=r*sin(y') \ \ -\pi<y'<\pi[[/tex]
[tex]z= \pm \sqrt{r^2-(r*cos(x'))^2-(r*sin(x'))^2}[/tex]

[tex]r=sqrt(x^2+y^2+z^2)[/tex]
[tex]x'=asin(x/r)[/tex]
[tex]y'=asin(y/r)[/tex]

For C

[tex]x=r*sin(x') \ \ -\pi<x'<\pi[/tex]
[tex]y=r*y'[/tex]
[tex]z= \pm \sqrt{r^2-(r*sin(x'))^2-(r*y')^2}[/tex]

[tex]r=sqrt(x^2+y^2+z^2)[/tex]
[tex]x'=asin(x/r)[/tex]
[tex]y'=y/r[/tex]

I'll have to think about the other ones but what is the difference between H3 and H4?
 
Last edited:
  • #4
I think you are maybe confusing a few things.

A geographical coordinate system, like your "I" diagram, is an arbitrary designation of lines of reference on a surface. These lines could be crazy zig-zag diagonals or whatever you want. The only point is that you have a common set of references (e.g., one degree above the primary equatorial zig-zag line, etc.) so everybody can understand what everyone else is referring to.

A mathematical coordinate system is entirely different. The way the lines are specified is not arbitrary. The coordinate directions must satisfy the property of mutual orthogonality. Also, the coordinate directions are not necessarily fixed at the origin, and instead, they may depend on where you are referencing from the point in space. For example, in cartesian coordinates, anywhere you look in space, the coordinate directions are fixed. Whereas in spherical coordinates, the radial vector points in a different direction for every point in space.

In other words, you can't just draw a series of lines on a globe and then talk about it as another type of coordinate system. You aren't talking about new mathematical coordinate systems, you are just talking about different sets of lines on the surface of a sphere. That's why there aren't any names for the things you've drawn; they don't have any mathematical significance.
 
  • #5
Anyway, continuing. For G you need to use equations like:

[tex][x,y,z] \cdot [0,sin(y'),cos(y')]=0[/tex]
[tex]x^2+y^2+z^2=r^2[/tex]
[tex][x,y,z] \cdot [sin(x'),0,cos(x')]=0 [/tex]

I'll skip the algebra for now as I don't feel like it.For J you need

[tex]y=ry'[/tex]
[tex]x=sqrt(r^2-(ry')^2)sin(x')[/tex]
[tex]z=sqrt(r^2-(ry')^2)cos(x')[/tex]

[tex]r=sqrt(x^2+y^2+z^2)[/tex]
[tex]y'=y/r[/tex]
[tex]x'=asin(x/sqrt(r^2-(ry')^2))[/tex]
 
Last edited:
  • #6
Just for fun, I'm going to make up some names:

A: Radial-Cartesian
B: Radial-Latitudinal
C: Radial-cylindrical
G: Radial-ByLongitudinal
J: Radial-Longitudinal

As I side note, I now see there difference between H3 and H4 but I don't feel like doing it now.
 
Last edited:
  • #7
Why do you want to pay somebody for the solutions? Is this a homework assignment?
Nope. I am trying to obtain a 3D mandelbrot type shape (my earlier threads are evidence of this). I was thinking that people may not respond otherwise, and also I offered because I'm grateful for any help, and think cash is a nice 'thank you'.

In any case, my post was removed, which is fair enough - this is apparently against the forum guidelines. I shall post again (edited):

Okay, my initial post is in more philosophical territory admittedly, though I would still love an answer to that if possible, but for now, I would like some answers to some concrete mathematical questions. I know many of you are more clever/knowledgeable than I am, so it should be fairly simple for some of you I reckon.

I basically want 4x2 sets of formulae to convert from spherical/polar coord systems to Cartesian and back again. I want to keep to the simple format shown below preferably. Here is the example for system "I" which of course is the standard spherical coord system (taken from Wikipedia). The two formula sets for this system include:

Convert from polar to cartesian with system "I"
Code:
x = radius * cos(azimuth) * sin(elevation)
y = radius * sin(azimuth) * sin(elevation)
z = radius * cos(elevation)

Convert from cartesian back to polar with system "I"
Code:
radius    = sqrt(x*x + y*y + z*z)
elevation = atan2( sqrt(x*x + y*y), z )
azimuth   = atan2(y,x)

(atan2 is simply the inverse tan, except it helps sort out the quadrant business. See the Wikipedia article here for more info.)

Okay so that's one of the systems for converting both ways. If anyone could do the above but with systems A, B, D & G, (and converting back to cartesian) as shown in the picture, then that would be great (I have code to easily test if each one works).

Bear in mind that each system in the picture is supposed to be a sphere. For example, system A looks like a circle with a simple grid on it, but obviously, the center part of the grid will be nearest to the observer (front part of the sphere facing the camera), and the left/right/up/down part of the grid will be further away following the curvature of the sphere, and corresponding with the west, east, north, and south part of the sphere. Of course, those lines will go round the back as well (just as system I's lines/curves do).

My preference is B & G if you don't have enough time to work on A and D. If anyone has any questions, or would like clarification of the nature of each grid on the spheres (perhaps showing them at a different angle), I would be happy to help.

********** EDIT: Thanks to John, note that G has already been partially solved, J has been solved apart from a quadrant issue that I might be able to sort out. Though I am having issues with A and B at the mo.
 
Last edited:
  • #8
mordechai9 said:
A mathematical coordinate system is entirely different. The way the lines are specified is not arbitrary. The coordinate directions must satisfy the property of mutual orthogonality.

This is not true. There is no reason a coordinate system must be orthogonal. In fact, the lines CAN be completely arbitrary.
 
  • #9
For coordinate systems A and B, I put in the missing square roots. The problem is if we know x',y', and r there are two possible values for z.

We could overcome this by maybe splitting one of these coordinates into two parts or we could introduce a binary coordinate to say which side of the sphere the point is on.

If we were to divide the number range up based on the side of the sphere then maybe something like this would work:

[-r/sqrt(r^2-y'^2),+r/sqrt(r^2-y'^2)]

To get continuity on the boundaries perhaps something like

and for the other side:

[-2r/sqrt(r^2-y'^2),-r/sqrt(r^2-y'^2)]U[+r/sqrt(r^2-y'^2),2r/sqrt(r^2-y'^2)]

I think though really, it is best to simplify things and remember that the sign of the z coordinate depends on the side of the sphere which is being transformed back to Cartesian.
 
  • #10
I'm going to return to A

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]

In the second set of equations it is important to remember as the equations are stated the x' and y' coordinates do not distinguish which side of the sphere the object is one. Therefore if you are going to map to x' and map back again it is important to remember which side of the sphere the object was on. This will determine the sign of z.
 
  • #11
mordechai9, I see how you think I could be confused, and I think I see what you mean when talking about referencing from different points in space. However, my diagrams still stand. To show you more easily what I mean, take sphere A. This is a mockup of how it could look from different angles:
http://www.skytopia.com/stuff/sphereA-shouldbe.png

Do you see now that it's a valid coord system? Also I inputted John's formula for J, and my program came up with this (very close to what I want, apart from the quadrant thing):
http://www.skytopia.com/stuff/sphereJ.png

Hi John,

Ignoring the quadrant business for now, the first view (front) in the PM I sent still shows a grid in a square, when it should be a grid in a circle. See the PM for more details, though here is the picture again for the record:
http://www.skytopia.com/stuff/sphereA2.png
 
Last edited by a moderator:
  • #12
Twinbee said:
Hi John,

Ignoring the quadrant business for now, the first view in the PM I sent still shows a grid in a square, when it should be a grid in a circle. See the PM for more details, though here is the picture again for the record:
http://www.skytopia.com/stuff/sphereA2.png

If your mapping from (x',y',r) to (x,y,z)

Choose r as a constant and points x',y' such that x'^2+y'^2<1
 
Last edited by a moderator:
  • #13
John, thanks - okay I'll look into that (modulus or something may help actually).
This is not true. There is no reason a coordinate system must be orthogonal. In fact, the lines CAN be completely arbitrary.
Though you're probably right, mordechai9's point about mutual orthogonality is interesting. This certainly helps answer my original philosophical enquiry, because my 'favourite' systems (A,B,D,G) I presented often have lines which meet each other at odd angles. For example, here is system G from a top view (instead of front):

http://www.skytopia.com/stuff/sphereGtop.png
 
Last edited by a moderator:
  • #14
Regarding some of your earlier pictures showing only half the sphere, you should be aware that most of your coordinate systems are in fact well-defined over only one hemisphere. While the lines of a coordinate system may intersect at almost any angle, they may NOT be parallel, because then they cease to distinguish different points. For example, your systems D and B suffer from this on the circle where the sphere intersects the y-z plane.

These places where the coordinate systems breaks down are called "coordinate singularities". In general, coordinate systems on curved surfaces can cover only a part of the surface, which is referred to as a "coordinate patch". In order to locate all the points on a curved surface, we must in general resort to several overlapping coordinate patches, together with a set of functions that describe how the coordinates correspond in the areas where the patches overlap.

The sphere in particular may be covered by a minimum of 2 coordinate patches. The ordinary spherical coordinate system has two coordinate singularities, at the north and south poles. To get a second coordinate patch to cover these singularities, we can take a rotated system, say with east and west poles.

It is possible to have a coordinate patch on the sphere with only one singularity; this is achieved via stereographic projection. Still, however, a second patch is required to completely cover the sphere.
 
  • #15
Interesting post Ben thanks. Does system A suffer from the problem as B and D as well?

Definition for this post to avoid confusion:- "coord set" means the x' and y' coords that define any point on a sphere's surface.

Are you saying that in systems D and B, and given certain limitations we can add on if necessary (such as hemisphere restricition for a coord), that a particular coord set may describe different points. Or are you saying the reverse - that a point could be described by two (or more) different coord sets? The first sounds terrible, but the second although a bit kludgy isn't too bad - one would just need to make sure one coord has preference over the other for a certain hemisphere etc. As I'm sure you know, unless hemisphere restriction is used for a coord, even system "I" has this problem - where a point on the surface of the sphere can be described in 2 different ways (2 coord sets).

John, I'm having slight difficulty converting the square grid to go round the 'back of the sphere' (not least because of the ambiguity that's Ben's probably implying). I understand what you mean about the "x'^2+y'^2<1", but often I won't have the luxury of confining it to that region, because a point's number may be doubled or incremented etc., so it would need to be somehow converted.

I imagine the formula might be fairly easy to adjust because as I said in the PM, when I convert from 'polar' to cartesian, then back to 'polar', then back to cartesian again, the problem goes away. Maybe I can use this technique (even if it's kludgy and slows things down a bit). Don't worry too much if you're busy though, since I'm more keen on system G at the moment which doesn't have the ambiguity problems that system B may suffer from.

Many thanks all for your help.
 
Last edited:
  • #16
No, system G has a huge ambiguity problem. Look at what happens on the circle in the y-z plane (I'm assuming the x-axis is the one pointing directly at us). On this circle, your coordinate lines are parallel (in fact, they are coincident), and so it's no longer possible for the coordinates to specify a unique point.

Systems A, B, C, D, G, and H all have this issue: on the circle in the y-z plane, the coordinate lines are parallel.

Systems E, F, I, and J are much nicer: they only have singularities at the north and south poles.
 
  • #17
By the way, what is the purpose of this? You seem to be writing some kind of program...

Whatever you are doing, the standard spherical coordinate system is probably going to be the easiest to use. If you are planning to do a bunch of rotations in three dimensions, the most efficient way is to use Cayley-Klein parameters (or quaternions).
 
  • #18
Ben Niehoff said:
No, system G has a huge ambiguity problem. Look at what happens on the circle in the y-z plane (I'm assuming the x-axis is the one pointing directly at us). On this circle, your coordinate lines are parallel (in fact, they are coincident), and so it's no longer possible for the coordinates to specify a unique point.

Ah, I didn't see this at first. You are getting a circle of ambiguity. So it works on each half sphere except at the boundary between the two half spheres.
 
  • #19
Twinbee said:
John, I'm having slight difficulty converting the square grid to go round the 'back of the sphere' (not least because of the ambiguity that's Ben's probably implying). I understand what you mean about the "x'^2+y'^2<1", but often I won't have the luxury of confining it to that region, because a point's number may be doubled or incremented etc., so it would need to be somehow converted.

Anyway, for reference not that it matters, I was assuming the z faces us the y points up and the x points to the right. So, you want to map stuff around the sphere in x' and y' coordinates? I thought you just wanted to map stuff back and forth between the two coordinate systems. I think we want to introduce some modulo stuff.

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^2-y^2)/r^2[/tex]
[tex]p_y=2*sqrt(r^2-x^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.
 
Last edited:
  • #20
By the way, what is the purpose of this? You seem to be writing some kind of program...

Whatever you are doing, the standard spherical coordinate system is probably going to be the easiest to use.

Yes, I tried that originally, though was a bit disappointed with the result. I'm actually looking to try and find a special version of the 3D mandelbrot. Trying to find a 3D analogue to the 2D rotation business (which is effectively multiplying with complex numbers) for 'hypercomplex' numbers may be a foolish task, but at the least we get nice pics in any case. Here's more info if you're interested:

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:

http://www.skytopia.com/stuff/spheregba.png

As you can see, I've highlighted the problem with G (see green line), but A and B don't have coincident lines.

It is possible to have a coordinate patch on the sphere with only one singularity
If we wanted only one singularity, is that the only way then?

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.
 
Last edited by a moderator:
  • #21
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.
 
Last edited:
  • #22
Hi Ben,

Here's a random guess
I'd hardly call it random - it's the very first idea I had too - in fact, you can see it explained 2/3rds down that article (not saying you copied of course :) - as the idea is semi-obvious I guess).

In fact, the nice ray-traced (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):

http://www.skytopia.com/stuff/mandelblob.png

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.
 
Last edited by a moderator:
  • #23
Here's the other views from your formulae, since the one above gives it less justice :)

http://www.skytopia.com/stuff/mandelblob2.png
 
Last edited by a moderator:
  • #24
Twinbee said:

Do you happen to know the algorith that generated the 3D object in top right of the web page?

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
Yep I detailed the algorithm here:
http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg4109/#msg4109

For context, you may want to see the "My attempt to open Pandora's box..." section from here first.

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?
The aforementioned section explains it properly, but basically instead of a single rotation in a 2D space circle (since complex multiplication is part of the mandelbrot formula), I join up two rotations around a sphere in 3D space. This is the basis behind the 3D mandelbrot shape, and so it's not just mapping the original 2D brot to the surface of a sphere.

This guy has done some http://www.bugman123.com/Hypercomplex/index.html of the thing too (includes formulae too).
 
Last edited by a moderator:
  • #26
Twinbee said:
Yep I detailed the algorithm here:
http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg4109/#msg4109

For context, you may want to see the "My attempt to open Pandora's box..." section from here first.

That is, by far, the closest I've ever seen to what I would expect a 3 dimensional mandelbrot set to look like. Clever of you to consider messing with the angular coordinate of a complex number rather than going for 'meta-complex' numbers--such as quarternion variants, that personally cost me many attempts without success. I'll look over your work more closely when brain cell's functioning.
 
  • #27
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
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! :)

And I don't think it will be useful to try to invent random kinds of spherical coordinate systems.
Perhaps, though I still think system B may be a good bet (where 'good' is defined as roughly 0.1% chance of finding the 3D brot, but to me that's enormous considering the payoff).
 
Last edited:
  • #29
Twinbee said:
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! :)

I've taken the liberty of posting your code. I hope you don't mind.

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 5-7. 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 x-y 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 all--I don't fully understand it, but if this is it, you're 98% of the way there.
 
Last edited:
  • #30
Well this thread seems to be taking a new direction :)

In line 3 the sign information of x and y is lost by taking the square root.
Well, it's simply part of the standard spherical coord system. The handy atan2 function sorts out the quadrant business. Do you think it may be worthwhile to investigate anyway?

This appears to be why you are adding pi and 1/2 pi to your angles in 5-7.
Nope, the pi and 1/2pi angle offsets were chosen by trial and error and are fairly arbitrary. I say 'fairly', because it produced what most looked like the 'holy grail' 3D brot, but in fact, other offsets also produce strange, interesting 3D objects which are quite different.

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 x-y plane or skip pi radians every iteration?
Drawing is done through SDL (well almost, I use the QuickCG library as well). Plotting the orbits is a good idea - I may look into that soon. I suspect we'll see helix-ish orbits some of the time yes (and more generally long curved spherical-mapped sort of lines), but of course where the radius is growing or shrinking.

I have a notion concerning coordinate systems. It seems the natural coordinate system should be toroidal rather than spherical.
Well, you'll never guess what - I've tried that previously too (at least my own intuitive version of it, I've yet to try the 'official' definition). You can see the old thread on physics forums.

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
 
Last edited:
  • #31
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 "co-latitude", 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 co-latitude).

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 3-fold rotational symmetry, or n-fold, but not continuous rotational symmetry). This is not to hard to do, but most possibilities are going to give you the taffy-like texture that you are trying to avoid. You should think about why this taffy-like 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 taffy-like structure go away. I have a hunch it might involve elliptic functions (which are doubly-periodic 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 taffy-like structure.

Also, for reasons that I hope you have tried to learn about, you cannot define a consistent 3-dimensional algebra analogous to the complex numbers that is algebraically closed. You can only define such algebras in 2^N dimensions.
 
  • #32
3D cardioid with a sphere attached at one end
You bet :) At the least, smaller spheres are getting attached to other bigger spheres in some way.

Forget coordinate systems
The reason why it may not be completely safe to ignore different systems is because the squaring/rotation bit (assuming it needs to be used) achieves subtly different results for different systems.

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.

(Hint: it has to do with continuity, and you can't make it go away just by choosing another coordinate system).
Perhaps not the spherical systems, but how about the aforementioned toroidal system, or some other with no singularites?

I'm not so sure why you're semi-convinced 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 quaternion-style 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 :)
 
Last edited:
  • #33
Twinbee said:
The reason why it may not be completely safe to ignore different systems is because the squaring/rotation bit (assuming it needs to be used) achieves subtly different results for different systems.

Rotation is a geometrical operation. It is not dependent on any coordinate system. Some coordinate systems may be better suited than others to calculate the effects of rotations, but if you are getting different results in different coordinate systems, then you are doing it wrong.

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 Cayley-Klein parameters, and quaternions, by the way).

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.

A 1D Mandelbrot ought to just be a line segment. It's just the cross section of the 2D Mandelbrot with the X axis...it's not a fractal at all. It's the rotations which generate the interesting bit. But I think you are aware, that in two dimensions, any nonlinear function can be used to generate fractals...z^n + c is one example, but you could also use sin(z) + c, etc.

Perhaps not the spherical systems, but how about the aforementioned toroidal system, or some other with no singularites?

The toroidal system has a ring-shaped singularity in the x-y plane. I really don't think it's worth the confusion that would entail.

I'm not so sure why you're semi-convinced 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.

I think the square-and-add bit is what's giving you taffy. I'm pretty sure you will need something more complicated.
 
  • #34
Rotation is a geometrical operation. It is not dependent on any coordinate system.

I kinda see what you're saying (if one wants to keep it as a 'straight line' over the sphere's surface), but compare these two:

http://www.skytopia.com/stuff/sphere-rotate.png

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?).

A 1D Mandelbrot ought to just be a line segment.
I was thinking more along the lines of various patterns of dots/dashes along the line, with some dots close to each other, and others further apart with some nice graduations, and mixtures of dot/dash alternations. Hardly 2D mandelbrot stuff, but still of note.

I think the square-and-add bit is what's giving you taffy. I'm pretty sure you will need something more complicated.
You may be surprised here - I certainly was. A few new renders by a very slightly modifed version of the formula (higher powers) produces extremely interesting results. Although it's not the 'holy grail', it's much closer than before. We're seeing tiny buds 'growing' on buds growing on bigger buds, with less of the 'taffy' look you speak of.

This one is of the whole thing:
http://www.bugman123.com/Hypercomplex/Mandelbrot-White8-large.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/0/141_03_09_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/0/141_04_09_09_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.
 
Last edited by a moderator:
  • #35
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.
Twinbee said:
Well, it's simply part of the standard spherical coord system. The handy atan2 function sorts out the quadrant business. Do you think it may be worthwhile to investigate anyway?

To be clear that we're on the same page, for the 2D mandelbrot angle are reference to the X-axis with the positive direction toward the positive Y-axis. For a vector making an angle from the Z-axis into the XY-plane there is no information to tell us if it's a positive or negative angle--there's no distinction between 30 degrees and -30 degrees, for instance. Because you're handing the atan2 a positive radius each time, it will only return values for the angle in two out of 4 quadrants.

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.
Well, you'll never guess what - I've tried that previously too (at least my own intuitive version of it, I've yet to try the 'official' definition). You can see the old thread on physics forums.

I've been thinking-over the angle problem above, so I haven't had a chance on this one yet.
 
Last edited:
Back
Top