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

Home » Public Forums » archive » 3D UserSym?
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: 3D UserSym? [message #67712 is a reply to message #67574] Mon, 10 August 2009 12:46 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Aug 10, 10:22 am, Brian Daniel <Daniels...@yahoo.com> wrote:
> 3) This is a less important issue, but still worth mentioning.  I have
> a lot of data to plot, and it looks like a big cloud of points.  There
> are 3 data points that are important to see in the context of the
> whole data set.  Using direct graphics, I could just over plot the 3
> points and always be able to see them.  How can you do that in object
> graphics?  Is there a way to set my full data set to be partially
> transparent?

You can do it either way (making them always appear, or making the
others transparent). You need to create a new orb object to be used
for those special points, and overplot those with the new object.

Returning to the example I gave above, to make the special points show
over the others:

x=randomu(seed,100) & y=randomu(seed,100) & z=randomu(seed,100)
sel=[1,3,5,7] ;indexes of the points to make special
osph=obj_new('orb') ;sphere object for the regular points
s_osph=obj_new('orb') ;sphere object for the special points
osph->setproperty,color=[255,255,0],radius=2.0
s_osph->setproperty,color=[255,0,0],radius=3.0
iplot,x,y,z,/scatter,sym_object=osph;plot the regular points
iplot,x[sel],y[sel],z[sel],/scatter,sym_object=s_osph,/over; plot the
special points
s_osph->setProperty,depth_test_function=8;make the special points
always appear over the others

The property dept_test_function is also inherited from IDLgrModel, see
the documentation for more details.

You can make the regular spheres transparent, but this makes drawing
much slower, (probably too slow if you have a cloud of points) since
instead of just figuring out which object goes on top, it is necessary
to calculate the result of seeing one through the other. Anyway, it is
done changing the alpha_channel of the orbs, which they inherit from
IDLgrPolygon, and defaults to 1.0 (opaque):

iplot,x[sel],y[sel],z[sel],/scatter,sym_object=s_osph;plot the special
points
iplot,x,y,z,/scatter,sym_object=osph,/over;plot the regular points
osph->setproperty,alpha_channel=0.5;make the regular points
semitransparent
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: .trace not working?
Next Topic: how to create a evf?

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

Current Time: Wed Oct 08 19:03:50 PDT 2025

Total time taken to generate the page: 0.00188 seconds