POV-Ray : Newsgroups : povray.programming : spherical coordinate conventions? Server Time
5 Jul 2024 16:25:02 EDT (-0400)
  spherical coordinate conventions? (Message 1 to 3 of 3)  
From: George Pantazopoulos
Subject: spherical coordinate conventions?
Date: 23 Feb 2003 11:16:21
Message: <3e58f3d5$1@news.povray.org>
Hey all,

        There seems to be two different convention for labeling the angles
in sperical coordinates. What I have been taught in school, and have seen in
two different math textbooks is the following: (assuming a right-handed
coordinate system, with z axis pointing up, and the x axis going out of the
page, toward the viewer)

    theta:  angle rotated about the normal, lives in the xy plane, measured
from the x-axis
    phi: angle from the normal, measured from the z axis.


However, in some graphics literature and code, these seem to be reversed.
Will this always be the case? Is there a separate convention in the graphics
world?

Thanks,
George Pantazopoulos


Post a reply to this message

From: Christopher James Huff
Subject: Re: spherical coordinate conventions?
Date: 24 Feb 2003 16:49:21
Message: <cjameshuff-2E21DE.16453724022003@netplex.aussie.org>
In article <3e58f3d5$1@news.povray.org>,
 "George Pantazopoulos" <the### [at] attbicom*KILLSPAM*> wrote:

>         There seems to be two different convention for labeling the angles
> in sperical coordinates. What I have been taught in school, and have seen in
> two different math textbooks is the following: (assuming a right-handed
> coordinate system, with z axis pointing up, and the x axis going out of the
> page, toward the viewer)
> 
>     theta:  angle rotated about the normal, lives in the xy plane, measured
> from the x-axis
>     phi: angle from the normal, measured from the z axis.

> However, in some graphics literature and code, these seem to be reversed.
> Will this always be the case? Is there a separate convention in the graphics
> world?

http://mathworld.wolfram.com/SphericalCoordinates.html

"Unfortunately, the convention in which the symbols [theta] and [phi] 
are reversed is frequently used, especially in physics, leading to 
unnecessary confusion."

Since computer graphics is closely linked to both physics and 
mathmatics, you will probably see a bit of inconsistency.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Wolfgang Wieser
Subject: Re: spherical coordinate conventions?
Date: 24 Feb 2003 17:11:38
Message: <3e5a9893@news.povray.org>
>         There seems to be two different convention for labeling the angles
> in sperical coordinates. What I have been taught in school, and have seen
> in two different math textbooks is the following: (assuming a right-handed
> coordinate system, with z axis pointing up, and the x axis going out of
> the page, toward the viewer)
> 
>     theta:  angle rotated about the normal, lives in the xy plane,
>     measured
> from the x-axis
>     phi: angle from the normal, measured from the z axis.
> 
Well, in theoretical physics and according to what I have been taught 
at university, it is measured in the following way: 

theta: measured down from the positive z-axis in range 0...Pi 
  (with Pi/2 when it crosses the x-y-plane)
phi: measured (positively/left) around z-axis in the x-y-plane with 
  range 0..2*Pi.
 
x axis: phi=0, theta=Pi/2
y axis: phi=Pi/2, theta=Pi/2
z axis: theta=0, phi=irrelevant

    / sin(theta) * cos(phi) \
r = | sin(theta) * sin(phi) |
    \ cos(theta)            /

The right-handed system: r,theta,phi
(while r,phi,theta is a left-handed system)

[Quoted from memory but pretty sure it is correct.]

HTH,
Wolfgang


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.