Point in Triangle

Hi,

I have a given set of 3D-point and the x,y-coordinates of one point
somewhere in my set of points. I
want to interpolate the height of the point. 
I want to add this point in my set and use the Delaunay-Triangulation of
VisAD. 
Without this extra point the Delaunay Triangulation is working fine.

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});
            FlatField terrain = new FlatField(terrain_type, set);
            terrain.setSamples(new float[][] {heightValues});
                    
            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");
        }

How can I find the triangle in which the point belongs to?
Are there some standard geometric algorithms to achieve that?
Where do I have to look at.

Thanks for your help in advance

Desiree



o------------------------------------------------------------------------o
| Desiree Hilbring      Institut fuer Photogrammetrie und Fernerkundung  | 
|                       Universitaet Karlsruhe, Germany                  |
|                                                                        |
|                       email: hilbring@xxxxxxxxxxxxxxxxxxxx             |
|                       # 0721 6083676                                   |
o------------------------------------------------------------------------o


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