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

Home » Public Forums » archive » Re: Plotting 3D spheres
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: Plotting 3D spheres [message #46311 is a reply to message #46308] Fri, 18 November 2005 08:33 Go to previous messageGo to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
pro plot_sphere

nOrbs = 20
s = systime(/seconds)
c = randomu(s, 3, nOrbs) * 2.
r = randomu(s, nOrbs)

orbArray = objarr(nOrbs)
for n=0, nOrbs-1 do $
orbArray[n] = OBJ_NEW('orb', POS=c[*,n], RADIUS=r[n], $
COLOR=randomu(s,3)*255, STYLE=2)

oModel = OBJ_NEW('IDLgrModel')
oModel -> Add, orbArray

xobjview, oModel, /BLOCK

obj_destroy, oModel

end

You'll find the source for orb__define.pro in $IDL_DIR\examples\visual.
The docs are in the header. You may want to play around with the
DENSITY keyword depending on the # of spheres you need to plot and your
hardware.

-Rick


PYJ wrote:
> Dear all,
>
> Hi~!
> I have a lot of spheres(3D positions of centers and radius).
> XC,YC,ZC,RADIUS: these are arrays.
> I want to express these spheres on 3D space.
> Maybe, many spheres overlap each other. I don't care this.
> Actually, I hope to plot some irregular shape by overlapping many
> spheres.
> Color shading is better.
>
> I have studied the example of procedure "shade_volume" a little. But I
> can't overlap spheres.
>
> How can I do it?
>
> Thank you~(^_^)
>
>
> (I love IDL! ^___^)
>
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Reading various HDF files
Next Topic: Re: Version control for IDL software

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

Current Time: Fri Oct 10 05:32:22 PDT 2025

Total time taken to generate the page: 1.59850 seconds