Hi Steven,
Your Gridded2DSet has manifold dimension = 1 since you
only gave one array length (1102). To draw a surface in
3-D, try a Gridded3DSet with manifold dimension = 2 or an
Irregular3DSet with manifold dimension = 2. You'd use the
Gridded3DSet if you have the same number of (lat, lon)
locations at each depth, and if they can be placed in
one-to-one correspondence with each other (then you'd
supply two array lengths: number_levels & n_points_per_level).
That is, use Gridded3DSet if your (lat, lon) locations form
awarped 2-D checkerboard. Otherwise, use an Irregular3DSet
where your (lat, lon) locations are organized into triangles.
It may be complex to define the triangles. Note you'd define
the triangles with a DelaunayCustom that you'd pass to the
Irregular3DSet constructor.
Good luck,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI 53706
hibbard@xxxxxxxxxxxxxxxxx 608-263-4427 fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html
On Wed, 8 May 2002, Steven W. Rock wrote:
> Hi All,
>
> I am currently evaluation VisAD to incorporate into a major NSF 5-year
> funded project for earthquake modeling. I am real excited with the
> capabilities I have seen so far. I am having one problem starting out
> with this product though. It is not clear when I should use the various
> domain sets. Which is appropriate for what?
>
> More specifically, I have a 3D set of data, (lat, lon, depth) that
> represents locations in my fault trace surface. The structure is that
> there are a surface trace of lat / lon locations at depth = 0. Then I
> step a delta distance into the ground and get another trace of lat, lon
> positions at this depth, then I keep stepping down till I reach the
> bottom of the trace, about 12 km into the ground.
>
> I wish to draw a 3D shaded surface of my earthquake fault trace as it
> dips into the ground. I basically want to see a shape of a "wrinked
> piece of paper" that juts into the ground.
>
> I did get a graph made using the Sierra Madre fault as an example. I
> used a Gridded2DSet for my domain, but this draws a wire mesh continuous
> line to outline my fault trace.
>
> If I can push this product through my group I would expect some major
> support in the next year. The lead university is U of Southern
> California and the Southern California Earthquake Center (SCEC). Thanks
> for all your help.
>
> Steven W. Rock
> Software Engineer
> Rock Technologies
> 516-897-7289
>
>
> ---------------------------------
> Program snippet
>
> latitude = new RealType("latitude",SI.meter,null);
> longitude = new RealType("longitude",SI.meter,null);
> domain_tuple = new RealTupleType(latitude, longitude);
>
>
>
> // Create the range tuple ( altitude, temperature )
> // Use RealTupleType( RealType[] )
> altitude = new RealType("depth",SI.meter,null);
>
>
> // Create a FunctionType (domain_tuple -> range_tuple )
> // Use FunctionType(MathType domain, MathType range)
> func_domain_range = new FunctionType( domain_tuple, altitude);
> // int NCOLS = surface.getNumCols();
> // int NROWS = surface.getNumRows();
>
> // Create the domain set
> domain_set = new visad.Gridded2DSet(domain_tuple, loc_vals,
> 1102);
>
> // Create function mapping
> func_domain_range = new FunctionType(domain_tuple, altitude);
>
> // Create a FlatField
> // Use FlatField(FunctionType type, Set domain_set)
> vals_ff = new FlatField( func_domain_range, domain_set);
>
>
> // and put the y values above in it
> vals_ff.setSamples( depth_vals );
>
> ----------------------------
> Example data - note this is not the full set
>
> static float[][] loc_vals = new float[][]{
> {34.1231F, 34.12223841F, 34.12526393F, 34.13105451F, 34.13137804F,
> 34.13102671F, 34.13067443F, 34.1311967F, 34.13453044F, 34.13994589F
> },{
> -117.73972F, -117.7505419F, -117.7599031F, -117.7682264F, -117.7788123F,
> -117.7896769F, -117.8005414F, -117.8113153F, -117.8211464F,
> -117.8298314F}};
>
>
> static float[][] depth_vals = new float[][]{ {
>
> 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F
> }
>
>
>