Hi thanks for your help, VisAd is working now, and I tried to implement
your hints.
So after the Triangulation I get an object terrain (class FlatField), how
does the geometry of this object looks like?
For implementing some Java3D-Objects for my application, I guess I need
some information about triangles, so that I know these coordinates go
together to build a triangle for building a 3D-object.
Sorry I am not experienced with Triangulations, am I wrong?
How would I got to build my 3D-obejcts?
Thanks Desiree
o------------------------------------------------------------------------o
| Desiree Hilbring Institut fuer Photogrammetrie und Fernerkundung |
| Universitaet Karlsruhe, Germany |
| |
| email: hilbring@xxxxxxxxxxxxxxxxxxxx |
| # 0721 6083676 |
o------------------------------------------------------------------------o
On Tue, 22 Aug 2000, Bill Hibbard wrote:
> Hi Desiree,
>
> > I am developing an Java3D Application, where I want to create a
> > terrain-surface from discrete Points. I have seen that the API from VisAD
> > includes some classes about Delaunay-Triangulation, but I do not have a
> > clue, how to use them, or if they can be helpful for me. Where can I find
> > more documentation, as in the API or even some examples?
> > Thanks for any help in advance.
>
> Assume that the locations of your points are defined in two
> arrays:
>
> float[] x_locations, y_locations;
>
> and the terrain heights at these points are defined in the
> array:
>
> float[] heights;
>
> Then you can create a terrain as a FlatField like this:
>
> RealType x = RealType.getRealType("x");
> RealType y = RealType.getRealType("y");
> RealType height = RealType.getRealType("height");
> RealTupleType xy = new RealTupleType(x, y);
> FunctionType terrain_type = new FunctionType(xy, height);
>
> Irregular2DSet set
> new Irregular2DSet(xy, new float[][] {x_locations, y_locations});
> FlatField terrain = new FlatField(terrain_type, set);
> terrain.setSamples(new float[][] {heights});
>
> Note that the 'new Irregular2DSet' constructor will implicitly
> invoke one of the Delaunay constructors to compute a topology
> for your x and y locations. You generally only need to invoke
> a Delaunay constructor explicitly when you are constructing a
> DealaunayCustom from a known topology.
>
> Please let me know if you have questions about this.
>
> Cheers,
> 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
>