[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 3D Vector Field Plot?
- Subject: Re: 3D Vector Field Plot?
- From: "Mark Hadfield" <m.hadfield(at)niwa.cri.nz>
- Date: Wed, 31 May 2000 10:01:18 +1200
- Cache-Post-Path: email@example.com
- Newsgroups: comp.lang.idl-pvwave
- Organization: NIWA
- References: <firstname.lastname@example.org>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:19823
"John Boccio" <email@example.com> wrote in message
> Is there any straightforward way to plot
> directed arrows representing a vector field
> in 3 dimensions?
> Anyone have a sample code for direct graphics?
> using IDLgrpolyline?
There is a class called MGHgrBarbPlot on my IDL page (see URLs below). It
uses an IDLgrPolyline to represent a collection of vector barbs with origins
specified by properties DATAX, DATAY & DATAZ and lengths specified by
properties DATAU, DATAV, DATAW. The geometry of the barb origins can be 1D,
2D, 3D, scattered, whatever. One slightly tricky thing that it handles
automatically is to get the aspect ratio "square", at least in normalised
coordinates. (Now that I think of it, it doesn't concern it self with
squareness in the vertical dimension--this would be a simple extension.)
However it doesn't meet your requirements in one significant way: there are
no heads on the arrows. My favoured way to make the array direction
unambiguous is to draw a symbol at each origin.
If you are rolling your own solution in object graphics I have one
suggestion: Use a single IDLgrPolyline for the entire collection of arrows
instead of a separate one for each arrow or part thereof. For large
collections the former is much faster.
Collection of all routines:
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand