RE: Plot Earthquake Fault Trace into the earth

Hi Steven,

> Thanks for all your help. I'm getting closer, but am not there yet. What
> do I use for the FunctionType, FlatField and setting the samples.
> Finally what do I use for the DataReferenceImpl and use to set it's
> data. When I try to use the altitude again the graph put's up a warning
> message that altitude is added twice to the graph.

Since all the information is in the Gridded3DSet, you don't need
a FlatField. Construct a DataReferenceImpl, pass your Gridded3DSet
to its setData() method, and pass the DataReferenceImpl to the
addReference() method of your display. You'd only need a Field if
you had other information dependent on lat, lon and alt, such as
temperature.

Good luck,
Bill

> Here's what I have so far ...
>
>
> latitude = new RealType("latitude",SI.meter,null);
> longitude = new RealType("longitude",SI.meter,null);
> altitude = new RealType("depth",SI.meter,null);
>
> RealType[] vis_array = {latitude, longitude, altitude};
> RealTupleType vis_tuple = new RealTupleType(vis_array);
>
> domain_set = new visad.Gridded3DSet(vis_tuple, loc_vals, 19, 58);
>
>
>
> display = new DisplayImplJ3D("display1");
>
> // Get display's graphics mode control and draw scales
> GraphicsModeControl dispGMC = (GraphicsModeControl)
> display.getGraphicsModeControl();
> dispGMC.setScaleEnable(true);
> dispGMC.setTextureEnable(false);
>
>
> // Create the ScalarMaps: latitude to YAxis, longitude to XAxis and
> // altitude to ZAxis and temperature to RGB
> // Use ScalarMap(ScalarType scalar, DisplayRealType display_scalar)
>
> latMap = new ScalarMap( latitude, Display.YAxis );
> lonMap = new ScalarMap( longitude, Display.XAxis );
> altZMap = new ScalarMap( altitude,  Display.ZAxis );
>
> // Add maps to display
> display.addMap( latMap );
> display.addMap( lonMap );
> display.addMap( altZMap );


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