English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

3 answers

The most direct way is to write the spherical vector in catesian form. Using the length r, colatitude (angle from the +z-axis) as f and azimuth (angle measured from the +x-axis towards the +y-axis) as a, the spherical vector is:

(r * cos(a) * sin(f)) i + (r * sin(a) * sin(f)) j + (r * cos(f)) k

Your original vector is: 0 i + y j + z k. Equating the two gives you 3 equations in the three unknowns:

0 = r * cos(a) * sin(f)
y = r * sin(a) * sin(f)
z = r * cos(f)

The first equation tells you that a = 90 deg or 270 deg
The sign on sin(a) matches the sign on y so if y >0 then a = 90 deg. If y < 0 then a = 270 deg.

The ratio: y/z = sin(f)/cos(f) = tan(f) tells you the value of f. Since f rnages from 0 to 180 deg.

With a and f determined: r = z/cos(f)

2006-09-18 07:54:27 · answer #1 · answered by Pretzels 5 · 0 0

Simple trigonometry is all that is needed. If the vector does not lie in any of the coordinate planes, then the trigonometry becomes much messier.

2006-09-18 14:12:01 · answer #2 · answered by Anonymous · 0 0

I think you mean in rectangular xyz coordinates.
Then you would have (rho, theta, phi)
Rho is the point's distance from the origin, theta is the angle from y axis towards the x axis (how much it opens up), phi the angle from the y axis up towards the z axis.
Hope I didn't mess this one up.

G'luck.

2006-09-18 13:53:40 · answer #3 · answered by James N 2 · 0 0

fedest.com, questions and answers