comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: how to define theta and phi of a sphere in IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: how to define theta and phi of a sphere in IDL [message #68586] Sat, 14 November 2009 22:20 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Nov 15, 3:33 am, nisha katyal <nishahans...@gmail.com> wrote:
> No, actually i do not want to define it that way. I want to define
> x,y,z cordinates in terms of r,theta,phi. i.e
> x=r*sin(theta)cos(phi)
> y=r*cos(theta)sin(phi)
> z=r*cos(theta)
>
> I don not kno the difference in defining theta and phi....

Don't you mean y=r*sin(theta)sin(phi)? If so, theta is the angle from
the north pole to the parallel where your point is (90°-latitude), and
phi is the longitude. And David was saying that this conversion could
be done as

xyz=cv_coord(from_sphere=[phi,!dpi/2d0-theta,r],/to_rect)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to define theta and phi of a sphere in IDL
Next Topic: Merge polygons using IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:57:08 PDT 2025

Total time taken to generate the page: 0.00441 seconds