Re: Across the Nth dimension...and onto the next

Hi Rick,

> today's question is about projections.  in the app i'm working on, data
> are represented in different dimensions -- 2D for a surface map of model
> results, 3D for a snapshot of what's going on underground, 4D for the
> time series of snapshots.
> by using getSamples() to extract the data points, i can map one onto
> another; iterating through the various float[][]s.  it occurs to me,
> however, that this violates the efficiency rule of VisAD (cf. the
> Developer's Guide, section 3.9).

Actually, for loops over float[][] arrays are what VisAD does
inside its methods, and are as efficient as possible.  In fact,
my tests indicate that Java is just as fast as C for this sort
of code.

The VisAD efficiency rule is really about avoiding invoking
methods once per datum.  This means, for example, avoid calling
FlatField.getSample() for each sample.  But calling getSamples()
and then looping over the float[][] or double[][] array is fine.

> the question: is there a higher-level means for projecting, say, a 2D
> map onto a surface of a 3D dataset?  the developer's guide shows an
> example of subtracting FlatFields, but they had the same number of
> dimensions...

Currently, the easiest and fastest way to do this kind of
thing is by manipulating float[][] and double[][] arrays.

By the way, if you come up with a way to save a DisplayImplJ3D
scene as a VRML file, we'd love to distributed that as part of
VisAD.  That would be very useful.

Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738

  • 2000 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: