[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Object Graphics newbie question



Arend Sluis (sluis@physics.rutgers.edu) writes:

> I want to make a 2D plot of, say, 10k data points, and each data point
> has associated with it a specific color and a set of secondary data
> points (an emission line spectrum). Since I want to be able to zoom in
> on and move around the data in order to make selection of individual
> data points easier, I thought that Object Graphics would be the way to
> go. However, it is 10k data points, so I clearly need to be careful in
> order to have efficient code. 

Unless you have one of those new wall-size monitors
from Sony, I would be a bit careful in visualizing
10K data points! In fact, I think I would spend just
a bit more time contemplating the difference between
analyzing the data and visualizing it. In this case,
I'm pretty sure I might choose a different method for
visualizing 10K points than I would for visualizing,
say, 100 of those 10K points. In fact, I might even
do it in two separate windows: an "overview" and a
"zoom" window, for example.
 
> My first question is: should I be using Object Graphics? I have no feel
> for how complicated it would be to implement the
> zoom/translate/selection features in Direct Graphics.

Selection might possibly be easier in object graphics,
but everything else is likely to be MUCH harder, depending
upon how familiar you are with it. Zoomimg and translating
are pretty much the same in either system.
 
> My second question is: Suppose I should use Object Graphics, should I
> use IDLgrPolygon for each data point, or should I try to do this using
> IDLgrPlot with a self-defined IDLgrSymbol (I want a filled symbol in
> order to see its color clearly). The "Objects and Object Graphics" IDL
> manual gives both as a possibility, but I am unclear on the relative
> merits of each.

I think I would use a symbol rather than a polygon, but
just because the infrastructure is already in place to
handle symbols. I'm pretty sure a symbol *is* a polygon
to the object graphics system, so I doubt you will take
a performance hit. I doubt you will need 10K symbols,
however. Try to limit the number of things you build,
so you don't take all day to render it. :-)

Cheers,

David
-- 
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155