MGHGRDENSITYRECT__DEFINE
Class Name
MGHgrDensityRect
Purpose
This class implements a "density plane", ie a representation of 2-D
numeric data on a flat surface using colour or grey-scale
density. A rectangular array of cells (quadrilaterals) is set out
and the data values are represented by the colour at the centre of
the cells (STYLE=0) or at the vertices (STYLE=1).
This density plot implementation (MDR) uses a rectangular
IDLgrPolygon with a texture-mapped image. The image has fixed
dimensions and data are regridded onto it. Compared with
MGHgrDensityPlane (MDP--an implementation based on an IDLgrSurface
or an IDLgrPolygon), an MDR is rendered faster (especially on
large datasets) but takes longer to initialise or to recalculate
for new data. The other major difference is that missing-data
cells in an MDR have byte value 0 whereas in an MDP they are
omitted from the object. The missing-cell behaviour of an MDR
could be changed using a true-colour, transparent image.
An MGHgrDensityRect (MDR) is very similar to an MGHgrDensityRect2
(MDR2), the difference being that in the MDR2 the image is not
texture-mapped on a polygon. The MDR2 is faster than the MDR but
doesn't fit well in a 3D environment.
To Do
Make initialisation more robust: allow DATAX, DATAY and/or DATA_VALUES
to be initially undefined.
###########################################################################
This software is provided subject to the following conditions:
1. NIWA makes no representations or warranties regarding the
accuracy of the software, the use to which the software may
be put or the results to be obtained from the use of the
software. Accordingly NIWA accepts no liability for any loss
or damage (whether direct of indirect) incurred by any person
through the use of or reliance on the software.
2. NIWA is to be acknowledged as the original author of the
software where the software is used or presented in any form.
###########################################################################
Modification History
Mark Hadfield, 1998-09:
Written, based on earlier density plot implementations.
Mark Hadfield, 2002-07:
Now allows a curvilinear horizontal grid via 2-dimensional
DATAX and DATAY arrays.