What forum is most appropriate when discussing spherical coordinate systems?(adsbygoogle = window.adsbygoogle || []).push({});

Anyway, I have a couple of questions I hope someone can help with. I've gone the extra mile to draw graphics so that it's easier to understand. (http://www.skytopia.com/stuff/sphere.png).

Normally, the system of spherical coords rotates around the Z and Y axis. That picture shows a unit sphere. So the white blob is the point at Zrot=45 degrees rotation, and the blue blob is Zrot=45 & Yrot=45 (the blue blob is actually 'behind' the sphere. Back to cartesian, this means that (Zrot=45 & Yrot=45) is converted to X=0.5 Y=0.707 Z=0.5.

However, instead I want the 'Y rotation' to rotate not to the blue blob, but to the red one. This would give coords of X=0.57735... Y=0.57735... Z=0.57735... or the 'true' corner of the sphere, if such a thing could be said. Basically, the Y rotation is rotating on a special diagonal axis to achieve this.

What system of spherical coords is this called? And how do I adapt the following function, to convert the old system into this new one, so that it returns 0.57735 for x, y & z, instead of returning 0.5, 0.707 & 0.5 respectively?

Second question.Code (Text):

xyz polarToXYZ(polar3d n) {

xyz loc;

loc.z = n.r * cos(n.zang)*sin(n.yang); // zang=z angle, yang=y angle, r=radius

loc.y = n.r * sin(n.zang);

loc.x = n.r * cos(n.zang)*cos(n.yang);

return loc;

}

Now for a new, but I think brilliant spherical coord system I thought of - I wonder if it has a name. Basically, instead of representing an angle by the Z and Y rotation, how about if we represent the spherical angle with a single angle + a distance it travels around at that angle? For example, we start at the yellow dot, and use:

specialangle=0 & distance=0.25(this would go in the direction behind the green central dot at the back of the sphere - 0.25 is used to show that it goes 25% around the sphere).

specialangle=0 & distance=0.5(this would go in the same direction, but end up at the left of the sphere in the diagram)

specialangle=90 & distance=0.25(this would end up at the top of the sphere)

specialangle=180 & distance=0.25(this would end up in the centre front of the sphere - on the green dot in fact).

specialangle=270 & distance=0.25(bottom of sphere)

specialangle=45 & distance=0.125(this would end up at the red dot!!)

I'd love to know the name of this coord system - it has nice properties the others lack, including easily being able to 'shrink' or 'enlarge' an angle.

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Spherical coord systems

**Physics Forums | Science Articles, Homework Help, Discussion**