[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: IDLgrPolyline
- From: "Mark Hadfield" <m.hadfield(at)niwa.cri.nz>
- Date: Wed, 26 Jul 2000 09:55:23 +1200
- Cache-Post-Path: firstname.lastname@example.org
- Newsgroups: comp.lang.idl-pvwave
- Organization: NIWA
- References: <email@example.com>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:20416
"Leon Majewski" <firstname.lastname@example.org> wrote in message
> 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
You might want to take a look at my "barb plot" class, which wraps up this
To run the latter you will need other routines from my library. You can get
them all in one of these files:
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!
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand