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

Home » Public Forums » archive » Re: large 3D array plot
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: large 3D array plot [message #49793] Fri, 18 August 2006 11:43 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Rick Towler writes:

> You can make your own tetrahedron or get RHTgrPSolid at:
> http://www.acoustics.washington.edu/~towler/programs/rhtgrps olid__define.pro

I think there might be some cut and paste issues in the
descriptions of the keywords, but I got the idea. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. (Opata Indian saying, meaning "Perhaps thou
speakest truth.")
Re: large 3D array plot [message #49795 is a reply to message #49793] Fri, 18 August 2006 11:25 Go to previous messageGo to next message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
adisn123@yahoo.com wrote:
> I'm using linux/unix with remote X.

This is part of the issue. AFAIK, rendering while using remote X causes
IDL to use the software renderer (but you'll want to verify this). That
being said, even using the software renderer on my machine (3.6 GHz P4)
I can view a cloud of 250k points reasonably well.


> And, when I said "(3, 210,000)", I meant 3 columns and 210,000 rows,
> thus 210,000 data points.
> These points plot a galactic image(stars, galaxies, clouds,...)

200k vertices aren't much for modern hardware. Part of the problem is
that these points are haphazardly arranged which will slow rendering. I
can render a million vertex surface faster than a 250k vertex random
"cloud" since the verts that form the surface are arrange in an optimal
fashion.


> I'm using symbols of spheres with linestyle = 6 thus, it does not
> connect each individual point, but rather show as points of spheres.

This compounds the issue immensely. Using spheres will add a large
number of polygons to the scene thus slowing it down even further. If
you followed the example for XPLOT3D, the default orb symbol has 402
vertices so now you're rendering ~85 million verts!

For this type of plot your approach (plotting a (hidden) line with
symbols at the vertices) is probably the best way to go. Your real
issue is the complexity of your symbol. Obviously you'll want to
simplify it as much as possible. At the very least set the DENSITY
keyword on your orb object to 0.2 which is the lowest you can set it to
and still have a 3d object (it has 18 vertices). The simplest symbol you
can get away with will be a tetrahedron (4 verts):

nverts = 210000
seed = SYSTIME(/SECONDS)
xyz = RANDOMU(seed, 3, nverts) * 1000

oTetra = OBJ_NEW('RHTgrPSolid', /TETRAHEDRON, $
RADIUS=0.2, COLOR=[75,125,230])
oTetra -> GetProperty, OBJECT=pObj
oSym = OBJ_NEW('IDLgrSymbol', pObj)

XPLOT3D, xyz[0,*], xyz[1,*], xyz[2,*], SYMBOL=oSym, $
LINESTYLE=6, /BLOCK

OBJ_DESTROY, [oTetra, oSym]

You can make your own tetrahedron or get RHTgrPSolid at:
http://www.acoustics.washington.edu/~towler/programs/rhtgrps olid__define.pro


Another thing to consider would be to write your own viewer which HIDEs
almost all of your data when you rotate the objects. You could do this
by plotting the data in 2 IDLgrPolyline objects. One with some data,
the other with lots. When a mousedown event is processed you hide the
'lots of data' polyline. At mouseup you unhide it. This probably would
be an easy hack on XPLOT3D.


> I'm not sure what graphics card installed on my machine.

No need to check at this point, but if simplifying your symbol doesn't
speed things up as much as you need, you may want to consider writing a
program to plot your data that will work with the IDL VM and install
that on your local machine. There still will be issues of configuring X
to use hardware rendering which can be easy or hard but at least you'll
have a better chance of viewing this data interactively.


-Rick
Re: large 3D array plot [message #49800 is a reply to message #49795] Fri, 18 August 2006 09:21 Go to previous messageGo to next message
adisn123 is currently offline  adisn123
Messages: 44
Registered: July 2006
Member
I'm using linux/unix with remote X.
And, when I said "(3, 210,000)", I meant 3 columns and 210,000 rows,
thus 210,000 data points.
These points plot a galactic image(stars, galaxies, clouds,...)
I'm using symbols of spheres with linestyle = 6 thus, it does not
connect each
individual point, but rather show as points of spheres.
I'm not sure what graphics card installed on my machine.

How do I check those in my command line?


Rick Towler wrote:
> What platform? Processor speed? If linux/unix are you using remote X?
> And when you say "(3, 210,000)" do you mean you have 210,000 data
> points? What are you plotting (cloud, surface, head)? Are you using
> symbols? What do you set LINESTYLE to? Are you using hardware
> rendering? What graphics card is installed on your machine?
>
> FWIW, your graphics card is probably not powerful enough to render your
> 200k vertices using xplot3d. And if you want to interactively move you
> rplot around, no other package is going to do much better.
>
> Depending on what you are plotting, you may be able to eek out some more
> performance but without knowing what you are plotting it is hard to be
> specific.
>
> -Rick
>
>
> adisn123@yahoo.com wrote:
>> Hi,
>>
>> My 3D vecotr(x, y, z)array is about (3, 210,000)size. Yeb. it's huge.
>> So, when I plot in 3D using xplot3D, it takes a quite of time (more
>> 10sec.), and it
>> lags everytime I try to rotate.
>>
>> Is there anyone who knows better 3D plotting tool to display such a
>> huge array in more efficient way?
>>
>> THanks.,
>>
Re: large 3D array plot [message #49812 is a reply to message #49800] Thu, 17 August 2006 17:38 Go to previous messageGo to next message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <1155854750.064537.283500@p79g2000cwp.googlegroups.com>,
adisn123@yahoo.com wrote:

> Hi,
>
> My 3D vecotr(x, y, z)array is about (3, 210,000)size. Yeb. it's huge.
> So, when I plot in 3D using xplot3D, it takes a quite of time (more
> 10sec.), and it
> lags everytime I try to rotate.
>
> Is there anyone who knows better 3D plotting tool to display such a
> huge array in more efficient way?
>
> THanks.,

I tried this on my PowerBook G4, which is not a speed demon, and I can
rotate the volume instantaneously.

xplot3d, randomn(seed, 200000), randomn(seed, 200000), $
randomn(seed, 200000)

Are you doing something different?

Ken Bowman
Re: large 3D array plot [message #49813 is a reply to message #49812] Thu, 17 August 2006 17:04 Go to previous messageGo to next message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
What platform? Processor speed? If linux/unix are you using remote X?
And when you say "(3, 210,000)" do you mean you have 210,000 data
points? What are you plotting (cloud, surface, head)? Are you using
symbols? What do you set LINESTYLE to? Are you using hardware
rendering? What graphics card is installed on your machine?

FWIW, your graphics card is probably not powerful enough to render your
200k vertices using xplot3d. And if you want to interactively move you
rplot around, no other package is going to do much better.

Depending on what you are plotting, you may be able to eek out some more
performance but without knowing what you are plotting it is hard to be
specific.

-Rick


adisn123@yahoo.com wrote:
> Hi,
>
> My 3D vecotr(x, y, z)array is about (3, 210,000)size. Yeb. it's huge.
> So, when I plot in 3D using xplot3D, it takes a quite of time (more
> 10sec.), and it
> lags everytime I try to rotate.
>
> Is there anyone who knows better 3D plotting tool to display such a
> huge array in more efficient way?
>
> THanks.,
>
Re: large 3D array plot [message #49879 is a reply to message #49795] Fri, 18 August 2006 15:53 Go to previous message
adisn123 is currently offline  adisn123
Messages: 44
Registered: July 2006
Member
> Another thing to consider would be to write your own viewer which HIDEs
> almost all of your data when you rotate the objects. You could do this
> by plotting the data in 2 IDLgrPolyline objects. One with some data,
> the other with lots. When a mousedown event is processed you hide the
> 'lots of data' polyline. At mouseup you unhide it. This probably would
> be an easy hack on XPLOT3D.

I'm not familiar with IDLgrPolyine objects. but, it seems like it draws
a line between
points, which I don't want to do.
What do you mean by "HIDEs almost all of your data when you rotate the
objects."?
How come you want to hide part of your date whilte rotating in 3D, then

what's the point of viewing in 3D?
Maybe, I didn't get what you meant...

THanks for the great tip on the symbols. I've never thought that'd be
an issue.





Rick Towler wrote:
> adisn123@yahoo.com wrote:
>> I'm using linux/unix with remote X.
>
> This is part of the issue. AFAIK, rendering while using remote X causes
> IDL to use the software renderer (but you'll want to verify this). That
> being said, even using the software renderer on my machine (3.6 GHz P4)
> I can view a cloud of 250k points reasonably well.
>
>
>> And, when I said "(3, 210,000)", I meant 3 columns and 210,000 rows,
>> thus 210,000 data points.
>> These points plot a galactic image(stars, galaxies, clouds,...)
>
> 200k vertices aren't much for modern hardware. Part of the problem is
> that these points are haphazardly arranged which will slow rendering. I
> can render a million vertex surface faster than a 250k vertex random
> "cloud" since the verts that form the surface are arrange in an optimal
> fashion.
>
>
>> I'm using symbols of spheres with linestyle = 6 thus, it does not
>> connect each individual point, but rather show as points of spheres.
>
> This compounds the issue immensely. Using spheres will add a large
> number of polygons to the scene thus slowing it down even further. If
> you followed the example for XPLOT3D, the default orb symbol has 402
> vertices so now you're rendering ~85 million verts!
>
> For this type of plot your approach (plotting a (hidden) line with
> symbols at the vertices) is probably the best way to go. Your real
> issue is the complexity of your symbol. Obviously you'll want to
> simplify it as much as possible. At the very least set the DENSITY
> keyword on your orb object to 0.2 which is the lowest you can set it to
> and still have a 3d object (it has 18 vertices). The simplest symbol you
> can get away with will be a tetrahedron (4 verts):
>
> nverts = 210000
> seed = SYSTIME(/SECONDS)
> xyz = RANDOMU(seed, 3, nverts) * 1000
>
> oTetra = OBJ_NEW('RHTgrPSolid', /TETRAHEDRON, $
> RADIUS=0.2, COLOR=[75,125,230])
> oTetra -> GetProperty, OBJECT=pObj
> oSym = OBJ_NEW('IDLgrSymbol', pObj)
>
> XPLOT3D, xyz[0,*], xyz[1,*], xyz[2,*], SYMBOL=oSym, $
> LINESTYLE=6, /BLOCK
>
> OBJ_DESTROY, [oTetra, oSym]
>
> You can make your own tetrahedron or get RHTgrPSolid at:
> http://www.acoustics.washington.edu/~towler/programs/rhtgrps olid__define.pro
>
>
> Another thing to consider would be to write your own viewer which HIDEs
> almost all of your data when you rotate the objects. You could do this
> by plotting the data in 2 IDLgrPolyline objects. One with some data,
> the other with lots. When a mousedown event is processed you hide the
> 'lots of data' polyline. At mouseup you unhide it. This probably would
> be an easy hack on XPLOT3D.
>
>
>> I'm not sure what graphics card installed on my machine.
>
> No need to check at this point, but if simplifying your symbol doesn't
> speed things up as much as you need, you may want to consider writing a
> program to plot your data that will work with the IDL VM and install
> that on your local machine. There still will be issues of configuring X
> to use hardware rendering which can be easy or hard but at least you'll
> have a better chance of viewing this data interactively.
>
>
> -Rick
Re: large 3D array plot [message #49888 is a reply to message #49793] Fri, 18 August 2006 13:33 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
David Fanning wrote:
> Rick Towler writes:
>
>> You can make your own tetrahedron or get RHTgrPSolid at:
>> http://www.acoustics.washington.edu/~towler/programs/rhtgrps olid__define.pro
>
> I think there might be some cut and paste issues in the
> descriptions of the keywords, but I got the idea. :-)

Yeah, a little cut and paste problem... I noticed that this morning and
fixed it locally but didn't upload the changes.

-r
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Algorithm for lat/lon searching
Next Topic: Re: oplot for plots

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

Current Time: Wed Oct 08 15:12:10 PDT 2025

Total time taken to generate the page: 0.00658 seconds