News: Support us via Flattr FLATTR Link

## The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!

 Pages: [1] 2 3 ... 5   Go Down
 Author Topic: Alternate Co-ordinate systems  (Read 14514 times) Description: Alternates to the regular triplex system 0 Members and 1 Guest are viewing this topic.
Timeroot
Fractal Fertilizer

Posts: 362

The pwnge.

 « on: January 13, 2010, 03:36:44 AM »

As far as I can tell, the main three coordinate system used in 3D are:
-Triplex (Spherical) Numbers
-Cartesian Coordinates
-Quaternions. Work like Cartesian, but can be manipulate like complex numbers. One dimension is kept at 0.

I've been thinking about other possible systems. Of course, there are ones on Wikipedia, such as:
-Cylindrical coordinates, which involve a height, radius, and angle.
-Parabolic coordinates. Specified by an angle, and coefficients for two parabolas with their foci fixed at their origin.
-Parabolic cylindrical coordinates. Like parabolic coordinates, but instead of using an angle, once specifies a height.
-A whole host of other systems defines by the intersections of the second order curves, planes, and/or tori. See wikipedia for them all.

I've thought of a couple other possibilities:

-One defines a sphere with two poles, not opposite one another, and then one measures the "latitude" from each [plus a radius]. Perhaps this would be interesting as one brings the two poles closer to one another; this may go the limit of the spherical coordinates. Note this would require an extra boolean value to define which half of the sphere it lies on.

-One defines a sphere with two poles, not opposite one another, and then one measures the "longitude" from each [plus a radius]. Perhaps this would be interesting as one brings the two poles closer to one another; this may also go the limit of the spherical coordinates. This is a multivalued function when converting to cartesian coordinates if the point lies on the great circle defined by the two points, but this can be resolved (with an extra boolean) if the point from which the distance measured for the third coordinate is slightly off the center of the sphere.

-Similar to the two above, but one pole uses latitude, the other longitude. Probably all this conflicting symmetry would not apply well to fractals.

-Distance from any three predefined noncollinear points. These three points could be at (1,0,0), (0,1,0), and (0,0,1) in Cartesian coordinates, or (1,0,0), (0,1,0), and (-1,0,0), or even (0,0,0), (1,0,0), and (0,1,0). Or they could form the vertices of an equilateral triangle in the XY plane around the origin.

-It's angles from the origin, that is, the theta and phi in triplex numbers, combined with the angle from some other point; for instance, the angle from the x-axis to the point from the perspective of (1,0,0).

I don't know how well these would lend themselves to aesthetics (or even simple algebraic operations), and I'm sure twinbee has tried several of these, but perhaps some can be well defined, and may produce some interesting results. Thoughts?
 Logged

Someday, man will understand primary theory; how every aspect of our universe has come about. Then we will describe all of physics, build a complete understanding of genetic engineering, catalog all planets, and find intelligent life. And then we'll just puzzle over fractals for eternity.
Paolo Bonzini
Guest
 « Reply #1 on: January 13, 2010, 11:32:45 AM »

I suggest that you start by defining the Mandelbrot set in any of these coordinate systems; for example, in quaternions you have it as $v=vi\bar v+c$ (c has only i and j components since it's 2D).  This could give ideas about generalizing it to 3D.
 Logged
hobold
Fractal Bachius

Posts: 573

 « Reply #2 on: January 13, 2010, 05:06:00 PM »

I'm new here, but don't be alarmed. Just dropping by to point you to a kind of spherical coordinates that apparently have not yet been used to try and define some kind of triplex algebra. While it isn't possible to properly cover a sphere with coordinates that have no poles, it is possible to cover it with coordinates that have only a single pole. Here is a sketch to illustrate the general idea:

http://www.vectorizer.org/sphereFan.mpg

The red and green lines are "parallel" grid lines of "latitude" and "longitude" (the yellow great circles are just "diagonals" and an "equator"). I think this is just a reinvention of the Riemann Sphere, or some equivalent. I arrived there starting from bipolar coordinates

http://en.wikipedia.org/wiki/Bipolar_coordinates

and moved the two poles closer and closer together until they met. It wasn't until a few hours later that I realized the relation to the Riemann Sphere mapping.

http://en.wikipedia.org/wiki/Riemann_sphere

The resulting coordinate system has a few unusual properties:

- only a single pole
- "latitude" and "longitude" are symmetrical and exchangeable

and a few usual ones

- "latitude" and "longitude" grid lines intersect at a 90 degree angle
- lengths and areas are not preserved

All in all, these seem to be unusually symmetrical coordinates. I don't know if this is particularly good or bad with respect to fractals. I currently do not have any closed formulas for mapping to cartesian coordinates, but geometrically, there should exist a well-defined correspondence.

I see two outstanding choices for the (0,0) coordinate point: either the pole, or the point directly opposed to it. In either case, the two great circles (one for "latitude" and "longitude" each) could be parameterized with arc length (for purposes of adding "angles"), as has been done in the animated example illustration. I think this would make it possible to embed a 2D Mandelbrot set in a potential 3D fractal.

However, I believe a different parameterization (that spaced the smaller circles close and closer together near the pole) could be better at preserving angles, i.e. it would make the grid cells close to the pole more closely resemble squares. But then the pole would turn into some sort of singularity, with the grid cells becoming infinitesimally small as you approach the pole.
 Logged
Timeroot
Fractal Fertilizer

Posts: 362

The pwnge.

 « Reply #3 on: January 14, 2010, 01:10:42 AM »

Huh, hobold, that's a very cool coordinate system. It seems it can be interpreted a couple different ways, such as (a) a Riemann sphere projection of the bipolar coordinates, or (b) the way it actually functions in 3D, where each angle specifies the angle a plane takes with the surface of the sphere at the pole, with the restriction that the plane contains one of two perpendicular lines tangent to the pole. In order to make it slightly more square, and this probably isn't the best idea by far, one could take the cube of the angle in the 2D infinite plane (in a way...I don't know how to describe it) which would separate out the lines close to the pole a bit more.

Paolo, good point. Maybe this weekend.
 Logged

Someday, man will understand primary theory; how every aspect of our universe has come about. Then we will describe all of physics, build a complete understanding of genetic engineering, catalog all planets, and find intelligent life. And then we'll just puzzle over fractals for eternity.
hobold
Fractal Bachius

Posts: 573

 « Reply #4 on: January 14, 2010, 09:02:37 AM »

The "monopolar" coordinates are indeed made from two fans of circles originating in the pole. Here is the PoV-Ray scene file used to create the illustration, maybe someone wants to play with it:

#global_settings {
assumed_gamma 1.0
}

camera {
location  <0, 0, -4.5>
direction <0, 0, 2>
up        <0, 1, 0>
right     <1, 0, 0>
sky       <0,1,0>
look_at   <0, 0, 0>
}

union {

// the base sphere
sphere {<0, 0, 0>, 1.0
texture{
pigment { color rgb <0.1, 0.1, 0.9> }
finish{
ambient 0.1
diffuse 0.9
specular 0.3
roughness 0.001
}
}
}

#declare parts = 40;  // number of grid lines
#declare Count = 1;

#declare px = 0;
#declare py = 0;
#declare diam = 0;
#declare px2 = 0;
#declare py2 = 0;
#declare nod = 0;

#while (Count < parts)
#declare px = sin(2*pi * Count/parts);  // travel along arc
#declare py = cos(2*pi * Count/parts);

#declare Count = Count + 1;

#declare px2 = px*px;
#declare py2 = (py - 1)*(py - 1);
#declare diam = sqrt(px2 + py2);   // distance from pole
#declare nod = atan2(py - 1, px);  // angle to pole tangent plane

torus {0.5*diam, 0.005  // a "thick circle" ...
translate 0.5*diam*x  // ... touching the pole ...
rotate nod*180/pi*z   // ... and the current point
translate 1*y

texture{
pigment { color rgb <0.1, 0.9, 0.1> }
finish{
ambient 0.1
diffuse 0.9
specular 0.3
roughness 0.001
}
}
}
#end

#declare Count = 1;
#while (Count < parts)
#declare px = sin(2*pi * Count/parts);
#declare py = cos(2*pi * Count/parts);

#declare Count = Count + 1;

#declare px2 = px*px;
#declare py2 = (py - 1)*(py - 1);
#declare diam = sqrt(px2 + py2);
#declare nod = atan2(py - 1, px);

torus {0.5*diam, 0.005
translate 0.5*diam*x
rotate nod*180/pi*z
translate y
rotate 90*y   // orthogonal to the first fan of circles

texture{
pigment { color rgb <0.9, 0.1, 0.1> }
finish{
ambient 0.1
diffuse 0.9
specular 0.3
roughness 0.001
}
}
}
#end

union {
torus {1.0, 0.005}  // an "equator"
torus {1.0, 0.005   // a "diagonal"
rotate 90*z
rotate 45*y
}
torus {1.0, 0.005   // another "diagonal"
rotate 90*z
rotate -45*y
}

texture{
pigment { color rgb <0.8, 0.8, 0.2> }
finish{
ambient 0.1
diffuse 0.9
specular 0.3
roughness 0.001
}
}
}

rotate -60*x
rotate 30*z
rotate -20*x

rotate clock*360*y

}

light_source { 1*<18, 30, 20> color rgb 0.7*<1.0, 1.0, 1.0>}
light_source { <-2, -1, -20> color rgb 0.8*<1, 1, 1>}

background { color rgb <0.5,0.6,0.8> }
 Logged
hobold
Fractal Bachius

Posts: 573

 « Reply #5 on: January 14, 2010, 03:00:21 PM »

For comparison, here is a Riemann Sphere with a checkerboard mapped to it:

http://vectorizer.org/riemann.png    (seen from slightly above the pole)

The tiles get vanishingly small towards the pole, but the grid lines are indeed
circles fanned from the pole.

I think I can safely assume that I re-invented the Riemann 3D-wheel. :-)
 Logged
hobold
Fractal Bachius

Posts: 573

 « Reply #6 on: January 15, 2010, 06:07:05 PM »

I keep tinkering with the "monopolar" coordinates, and I think I should be able to provide formulas. The math is a bit awkward, and will probably be slow and imprecise in the computer, but so far it has been tractable.

With the pole at (0, 1, 0), and the spherical coordinate origin located at the pole, you can get two arc lengths for a point (Px, Py, Pz) on the unit sphere like this:

if (Py == 1) {  // check for pole
Ax = 0;
Az = 0;
} else {
Rx = Px/(Py - 1);                    // Riemann projection
Ax = atan2(2*Rx, Rx*Rx - 1);   // arc length
Rz = Pz/(Py - 1);
Az = atan2(2*Rz, Rz*Rz - 1);
}

As you can see, the numerics will become unstable near the pole (Py = 1), and you need slow trigonometric functions.

Furthermore, the perfect rotational symmetry of the Riemann sphere might cause the resulting 3D-Fractal to be a boring shape with rotational symmetry. Still, we don't know until we tested, so I won't give up yet. :-)

BTW, the monopolar coordinates could potentially be extended from a spherical surface to cover a three dimensional space. The three coordinates would be the two arc lengths above, and a signed(!) distance from the pole. Like having a negative sphere touching the original Riemann sphere at the shared pole. Not sure if those particular 3D coordinates would be good for any fractal purposes.
 « Last Edit: January 15, 2010, 06:13:59 PM by hobold » Logged
msltoe
Iterator

Posts: 187

 « Reply #7 on: January 16, 2010, 02:47:11 AM »

hobold - your idea is worth a shot.

The symmetry looks a little like one might expect for the 3-d Mandelbrot. The pole could be analogous to the positive x-axis cusp region of the 2-D M-set.

Can you figure out the inverse equation from Ax, Az to Px,Py,Pz? I started on it, but it looks a bit involved. Maybe it simplifies at the end?

-mike
 Logged
Paolo Bonzini
Guest
 « Reply #8 on: January 16, 2010, 10:35:11 AM »

if (Py == 1) {  // check for pole
Ax = 0;
Az = 0;
} else {
Rx = Px/(Py - 1);                    // Riemann projection
Ax = atan2(2*Rx, Rx*Rx - 1);   // arc length
Rz = Pz/(Py - 1);
Az = atan2(2*Rz, Rz*Rz - 1);
}

So for any length that would be:

if (Px == 0 && Pz == 0) {
Ax = 0;
Az = 0;
} else {
Length = sqrt(Px*Px+Py*Py+Pz*Pz);
Rx = Px/(Py - Length);
Ax = atan2(2*Rx, Rx*Rx - 1);   // arc length
Rz = Pz/(Py - Length);
Az = atan2(2*Rz, Rz*Rz - 1);   // arc length
}
 Logged
Paolo Bonzini
Guest
 « Reply #9 on: January 16, 2010, 11:14:50 AM »

Can you figure out the inverse equation from Ax, Az to Px,Py,Pz? I started on it, but it looks a bit involved. Maybe it simplifies at the end?

Yes (almost). First of all, of course the solution is (0,1,0) is Ax=Az=0, else you have

Rz^2 - 2 / tan Az * Rz - 1 = 0
Rz^2 - 2 * cot Az * Rz - 1 = 0

which gives

Rz = cot Az +- sqrt (cot^2 Az + 1) = cot Az +- csc Az
Rx = cot Ax +- csc Ax

I still haven't figured out how to pick the right solution but only one will give the right Ax/Az when fed back into atan2.  anyway, once you have these you can replace

Px=Rx*(Py-1)
Pz=Rz*(Py-1)

into Px^2+Py^2+Pz^2 = 1 giving

Py^2 (Rx^2+Rz^2+1) - 2 Py (Rx^2 + Rz^2) + (Rx^2 + Rz^2-1) = 0

which has only one valid solution (the other is Py=1 which is invalid):

Px = -2*Rx/(Rx^2+Rz^2+1)
Py = (Rx^2+Rz^2-1)/(Rx^2+Rz^2+1)
Pz = -2*Rz/(Rx^2+Rz^2+1)
 « Last Edit: January 16, 2010, 11:42:07 AM by Paolo Bonzini » Logged
hobold
Fractal Bachius

Posts: 573

 « Reply #10 on: January 16, 2010, 12:08:53 PM »

Can you figure out the inverse equation from Ax, Az to Px,Py,Pz? I started on it, but it looks a bit involved. Maybe it simplifies at the end?
That's the next thing I am going to try. I think I already know how I want to construct a solution geometrically:

1. An arc length indirectly specifies a plane, namely the plane of the circle of all points who have that same coordinate value.

2. The two planes of both arc length coordinates intersect in a line (except if both arc lengths are zero, but that case is easy)

3. the line intersects the unit sphere in two points, one of which is the pole

4. the line can be expressed as a ray: <starting point> + <free parameter> * <direction>
I hope to be able to express the line with the pole as starting point, then the first intersection is at parameter value zero and can be divided out, leaving us with just the one desired solution and no need to compute square roots.

I'll try to do this with the necessary mathematical rigour in the next few days.
 Logged
hobold
Fractal Bachius

Posts: 573

 « Reply #11 on: January 16, 2010, 12:13:16 PM »

So for any length that would be:

if (Px == 0 && Pz == 0) {
Ax = 0;
Az = 0;
} else {
Length = sqrt(Px*Px+Py*Py+Pz*Pz);
Rx = Px/(Py - Length);
Ax = atan2(2*Rx, Rx*Rx - 1);   // arc length
Rz = Pz/(Py - Length);
Az = atan2(2*Rz, Rz*Rz - 1);   // arc length
}

I am not sure I understand the (Py - Length) term ... ?

My own (Py - 1) comes from "subtract the Pole (0, 1, 0) from the point (Px, Py, Pz)", because I need a direction vector from the pole to the point P (for the Riemann projection). It just so happens that the Y axis is the only coordinate where that requires actual computation.
 Logged
Paolo Bonzini
Guest
 « Reply #12 on: January 16, 2010, 02:33:26 PM »

So for any length that would be:

Length = sqrt(Px*Px+Py*Py+Pz*Pz);
Rx = Px/(Py - Length);
Ax = atan2(2*Rx, Rx*Rx - 1);   // arc length

I am not sure I understand the (Py - Length) term ... ?
I'm just computing the angles Ax and Az for (Px/Length, Py/Length, Pz/Length) which gives Rx = Px/Length / (Py/Length - 1) = Px / (Py - Length).  Alternatively...

My own (Py - 1) comes from "subtract the Pole (0, 1, 0)
... when you map a point whose distance from the origin is Length, the pole is at (0, Length, 0).
 Logged
hobold
Fractal Bachius

Posts: 573

 « Reply #13 on: January 16, 2010, 04:38:23 PM »

... when you map a point whose distance from the origin is Length, the pole is at (0, Length, 0).
Ah, that one fits my mental image. Thank you! I had caged myself into the unit sphere, but the radius doesn't really matter at all.
 Logged
msltoe
Iterator

Posts: 187

 « Reply #14 on: January 16, 2010, 06:39:38 PM »

Here's the first attempt to render this fractal, doubling angles and squaring magnitude. I might've made a mistake, so others should try themselves. I used the cot+csc root only. Its possible the roots may need to be selected depending on some criteria. max iterations = 25.
 monopolar1.png (102.7 KB, 339x401 - viewed 2201 times.) « Last Edit: January 16, 2010, 06:41:21 PM by msltoe » Logged
 Pages: [1] 2 3 ... 5   Go Down