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

Home » Public Forums » archive » Re: draw spheres in 3D space
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: draw spheres in 3D space [message #76489 is a reply to message #76488] Mon, 06 June 2011 16:15 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Jun 6, 4:19 pm, David Fanning <n...@idlcoyote.com> wrote:
> Paulo Penteado writes:
>> xyz=[[0,0,0],[2,0,0],[-2,0,0],[0,2,0],[0,-2,0],[0,0,2],[0,0, -2]]
>> p=plot3d(xyz[0,*],xyz[1,*],xyz[2,*],sym_object=orb(),/
>> undocumented,linestyle='none')
>
> I admit that's pretty cool. But what does a "radius
> of one" mean in this context? For example, here are
> orb objects with a radius of 5, but clearly this
> radius has nothing whatsoever to do with the axes:
>
>   p=plot3d(xyz[0,*],xyz[1,*],xyz[2,*], $
>      sym_object=orb(radius=5),/ undocumented,$
>      linestyle='none')

Yes, I had not noticed that a "hard" radius was intended. Those sizes
are unrelated to the data space because the spheres are taken as plot
symbols, and as such have "soft" sizes. You can see that if you change
the size of the window: the symbols will remain the same size, while
the axes will change.

Borrowing from Mike's example, this could be done with iplot
(similarly with plot3d()) by making a bunch o spheres with the proper
sizes and positions in a model, then putting that model into the
plot's data space:

xyz=[[0,0,0],[2,0,0],[-2,0,0],[0,2,0],[0,-2,0],[0,0,2],[0,0, -2]]
model = obj_new('IDLgrModel')
for i=0,6 do model-
> add,obj_new('orb',pos=xyz[*,i],radius=1.,color=[255, 215, 0])
iplot,xyz,/scale_isotropic,/scatter,sym_index=0
id=itgetcurrent(tool=ot)
oplot3d=ot->getbyidentifier(ot->findidentifiers('*/PLOT3D',/
visualization))
oplot3d->add,model
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Automated plotting for website?
Next Topic: Major ticks is exceeds the plotting window

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

Current Time: Sat Oct 11 01:53:58 PDT 2025

Total time taken to generate the page: 0.08166 seconds