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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Plotting 3D spheres [message #46308] Fri, 18 November 2005 17:18
snfinder@naver.com is currently offline  snfinder@naver.com
Messages: 35
Registered: August 2005
Member
Wow~ Wonderful~~ ^^
Thanks a THOUSAND MILLION BILLION~~~""Rick Towler"" ~~ ^________^

OBJ? Wow~ I didn't know that there is beautiful method~
Um.. I have to get down to study that subject .
OK~

Thanks a lot again~ Rick

I love this group. It gives me very~~ big helps.

Park
Re: Plotting 3D spheres [message #46311 is a reply to message #46308] Fri, 18 November 2005 08:33 Go 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! ^___^)
>
Re: Plotting 3D spheres [message #46318 is a reply to message #46311] Fri, 18 November 2005 00:43 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
PYJ writes:

> 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?

In twenty-five words, or less, please. ;-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Wed Oct 08 14:01:18 PDT 2025

Total time taken to generate the page: 0.01242 seconds