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 #68589 is a reply to message #68588] Sat, 14 November 2009 21:18 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
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.")
[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: Fri Oct 10 12:11:23 PDT 2025

Total time taken to generate the page: 1.11998 seconds