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 #76488] Mon, 06 June 2011 21:26 Go to previous message
Junum is currently offline  Junum
Messages: 13
Registered: May 2010
Junior Member
On Jun 6, 6:15 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> 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

Thank very much Paulo.
It helps me a lot.

Jun
[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: Fri Oct 10 14:26:47 PDT 2025

Total time taken to generate the page: 2.47838 seconds