Twinbee said:
... For your interest, all of this is intended in the hope of creating interesting 3D fractals with detail in all 3 dimensions, rather than 1 or 2 that "quaternion" fractals usually have.
OK, now I know what you are aiming for, but what role does the torus play in this?
Twinbee said:
x = (a – b*cos(B)) * cos(A)
y = (a – b*cos(B)) * sin(A)
z = b*sin(B)
What coordinate system is this? So basically, I want to retrieve a,b,A,B from using x y z. Any idea how?
I assume that (x,y,z) are the Cartesian coordinates. a and b are the major and minor radii of the torus, respectively; A is the angle for the rotation in the xy-plane; B is the angle for a rotation in the xz-plane. These equations tell you the Cartesian coordinates (x,y,z) of any point on the torus with fixed
parameters a and b and the two coordinates A and B.
This is
not a relation between two coordinate systems. Why? Because the (x,y,z) can describe
any point in 3D space, whereas A and B describe only those points
on the surface of a
particular torus characterised by a and b.
How are you going to specify four things (a,b,A,B) given only three coordinates (x,y,z)? Suppose you
choose some value for b. Then, from z you
might be able to calculate B = arcsin(z/b). Then you
might be able to get a from
(x
2 + y
2). Finally A=arctan(y/x). But this will be to no avail because a and B will depend upon the value that you chose for b; i.e. your "coordinate system" transformation is not unique.
In summary: either you wish to express points on the surface of a particular torus in terms of Cartesian coordinates, in which case you can only go one way (a,b,A,B ---> x,y,z) OR
you wish to express all points in 3D in terms of several different coordinate systems that can do this (e.g. the toroidal coordinates of the OP), in which case it is usually possible to obtain one set of coordinates from the other.
Twinbee said:
I've looked at the Wikipedia page again, and I think you updated it - nice one!
"Not I", said the cat. Life is too short to keep up with Wikipedia.