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 #68588 is a reply to message #68587] Sat, 14 November 2009 21:33 Go to previous messageGo to previous message
nisha katyal is currently offline  nisha katyal
Messages: 2
Registered: November 2009
Junior Member
On Nov 15, 10:18 am, David Fanning <n...@dfanning.com> wrote:
> nisha katyal writes:
>> I have to draw spheres using idl . I want to define x,y,z in terms of
>> r,theta and phi. Do i have to define theta and phi both as following:
>
>> IDL> phi=2*!pi*(findgen(npoints)/(npoints-1))
>
> You can use CV_COORD to convert back and forth from
> polar, spherical, and rectangular coordinates. You
> don't have to do it yourself.
>
>> And also if i want to plot,should i plot x,z or y,z or x,y?
>
> Generally, if you are plotting on a rectangular
> coordinate system, you will need rectangular coordinates.
> But you can do this conversion just before plotting.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

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....
[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: Sat Oct 11 10:12:22 PDT 2025

Total time taken to generate the page: 0.08231 seconds