Hi Desiree,
I am travelling with only poor modem connections, so cannot
analyze your puzzle in much detail. You code looks OK, like it
should generate an ordinary terrain surface. It is true that
polygons have zero thickness viewed edge-on, but I don't think
terrain surface polygons are generally viewed edge-on.
One possibility is for me to run your app, although I am sure
that would require you to package up a lot of code and data.
Good luck,
Bill
On Mon, 1 Oct 2001, Desiree Hilbring wrote:
> Hi Bill and others,
>
> Maybe you remeber, I am using VisAD for creating some terrain like planes.
> My current goal is to present the user a kind of 2D view. The user can
> specify in my universum some planes parallel to the Java3D y-Axis, which
> are clipping my terrain planes (I am using the ModelClip of Java3D). The
> Viewing platform is placed along the
> normal from the clipping plane, so that the user gets a view of a kind of
> 2D profile. Unfortunately the terrain planes are kind of 2D, they don't
> have any thickness, so they are very hard to see in the profile view. Is
> it possible to make the planes thicker. Or has Visad any methods for
> really calculating the profile, so that I could create a LineArray?
>
> I added a screenshot to my homepage:
>
> http://www-ipf.bau-verm.uni-karlsruhe.de/Personen/hilbring/welcome.html
>
> Just look for 2D-View.
>
> Thanks for your help in advance.
>
> Desiree
>
>
> How do I create my planes:
>
> RealType x = RealType.getRealType("x");
> RealType y = RealType.getRealType("y");
> RealType height = RealType.getRealType("height");
> try {
> RealTupleType xy = new RealTupleType(x, y);
> FunctionType terrain_type = new FunctionType(xy, height);
> Irregular2DSet set = new Irregular2DSet(xy,new float[][]
> {eastValues,northValues});
> {eastValues,northValues});
> FlatField terrain = new FlatField(terrain_type, set);
> terrain.setSamples(new float[][] {heightValues});
> double[] eastValuesIntpol = new double[eastValues.length+1];
> double[] northValuesIntpol = new double[northValues.length+1];
> for (int i=0;i<northValues.length;i++) {
> eastValuesIntpol[i]=eastValues[i];
> northValuesIntpol[i]=northValues[i];
> //System.out.println("eastValue"+eastValues[i]);
> //System.out.println("northValue"+northValues[i]);
> }
>
> display = new DisplayImplJ3D("display1");
> ScalarMap hoxmap = new ScalarMap(x, Display.XAxis);
> ScalarMap reymap = new ScalarMap(y, Display.YAxis);
> ScalarMap heightmap = new ScalarMap(height, Display.ZAxis);
>
> display.addMap(hoxmap);
> display.addMap(reymap);
> display.addMap(heightmap);
>
> hoxmap.setRange(-1.0, 1.0);
> reymap.setRange(-1.0, 1.0);
> heightmap.setRange(-1.0, 1.0);
>
> DataReferenceImpl data_ref = new
> DataReferenceImpl("data_ref");
> data_ref.setData( terrain );
> renderer = new DefaultRendererJ3D();
> display.addReferences(renderer,data_ref);
> display.addDisplayListener(listener);
> }
> catch (VisADException ve) {
> System.out.println("VisAd TupleType Exception");
> }
> catch (RemoteException re) {
> System.out.println("RemoteExcpetion");
> }
> }
>
>
> oooooooooooooooooooooooooooooooooooooooooooooooo
> Desiree Hilbring
>
> Institut fuer Photogrammetrie und Fernerkundung
> Universitaet Karlsruhe, Germany
> email: hilbring@xxxxxxxxxxxxxxxxxxxx
> # 0721 6083676
> oooooooooooooooooooooooooooooooooooooooooooooooo
>
>
>
>