Re: Sphere in iTools? [message #42063] |
Sat, 18 December 2004 13:25 |
Joe[4]
Messages: 2 Registered: December 2004
|
Junior Member |
|
|
It was pretty easy to drop it into iTools.
pro sphere, radius, itoolid
oOrb = OBJ_NEW('orb', RADIUS=radius, DENSITY=2.0)
oOrb -> GetProperty, DATA=verts
OBJ_DESTROY, oOrb
iplot, verts, overplot=itoolid
end
Thanks Rick!
Joe
|
|
|
Re: Sphere in iTools? [message #42067 is a reply to message #42063] |
Fri, 17 December 2004 13:37  |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
Joe wrote:
> Hello-
>
> I'm relatively new to IDL programming so please forgive me if this is a
> stupid question...
>
> How can I create a sphere using iTools?
I can only get you half-way.
You can get the vertices and connectivity for a sphere from the "orb"
object:
oOrb = OBJ_NEW('orb', RADIUS=2.0, DENSITY=2.0)
oOrb -> GetProperty, DATA=verts, POLYGONS=conn
OBJ_DESTROY, oOrb
What you do with the data in verts and conn in iTools is up to you.
The more general question would be how to get an instance of
IDLgrPolygon into an iTool. If you get an answer to that, then you can
just drop the orb in and forget about the rest.
-Rick
|
|
|