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

Home » Public Forums » archive » Re: IDLgrPolyline
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: IDLgrPolyline [message #20791] Wed, 26 July 2000 00:00
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
"Leon Majewski" <majewski@cygnus.uwa.edu.au> wrote in message
news:397dbe55.6657070@news.uwa.edu.au...
> ...
>
> I'm trying to create a field of displacement vectors, with arrows
> pointing from the origin (i,i) to the destination (i+delx, j+dely). I
> figured that a (whole lot of) polyline with an invisible character at
> the start and a visible character at the end would suffice for arrows
> - and this seems to be true (& easy).
>
> However I wonder if how I am adding each polyline to the model (view,
> window) is the best approach (see code segment below). When I have a
> large number of polylines to be added it takes a (rather) long time.

Object graphics operations become slow when there are more than a few
hundred atoms in your graphics tree. The fastest way (by far) to draw a
large number of line segments is to wrap them all in a single IDLgrPolyline.
Then you can handle several thousand or more. You specify the vertex
positions via the DATA keyword and how the vertices should be joined via the
POLYLINES keyword.

You might want to take a look at my "barb plot" class, which wraps up this
functionality:

http://katipo.niwa.cri.nz/~hadfield/gust/software/idl/mghgrb arbplot__define.
pro
http://katipo.niwa.cri.nz/~hadfield/gust/software/idl/mgh_ex ample_barb.pro

To run the latter you will need other routines from my library. You can get
them all in one of these files:

http://katipo.niwa.cri.nz/~hadfield/gust/software/idl/MARKS_ ROUTINES.tar.gz
http://katipo.niwa.cri.nz/~hadfield/gust/software/idl/MARKS_ ROUTINES.zip

I must admit that I haven't got proper heads on the arrows--the barb plot is
just a collection of lines. However it's pretty simple to mark the base
and/or the head of each barb with a symbol, much as you have done. But until
a few days ago I didn't even know IDLgrPolylines could *have* symbols (I
knew IDLgrPlot objects could) so I'm a bit behind there!

---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield/
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: selecting model objects
Next Topic: help with future application

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

Current Time: Sat Oct 11 04:39:04 PDT 2025

Total time taken to generate the page: 1.83933 seconds