NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: Point in Triangle

Desiree,

I think that what you want to do can be done using the method 
SimpleSetIface.valueToInterp(float[][],int[][],float[][]).

Having said that, I'll now respond to your specific questions.

>Date: Thu, 22 Feb 2001 17:32:01 +0100 (MET)
>From: Desiree Hilbring <hilbring@xxxxxxxxxxxxxxxxxxxx>
>To: Steve Emmerson <steve@xxxxxxxxxxxxxxxx>
>Subject: Re: Point in Triangle 

The above message contained the following:

> thanks for your immediate answer.
> Unfortunately I am not familiar to Delaunay Triangulation.

Neither am I -- which makes this difficult.

> Ok, I understand the Delaunay Triangulation breaks up my set of points in
> a structure with triangles. I thinks this happens somewhere in Irregular2D
> set. But how are the triangles organized?

To answer that question, I believe that I would have to know what the
fields of the Delaunay class are (Edges, Tri, Vertices, Walk).  I don't.
The class visad.Delaunay has the following commentary, however:

  public int[][] Tri;        // triangles/tetrahedra --> vertices
                             //   Tri = new int[ntris][dim + 1]
  public int[][] Vertices;   // vertices --> triangles/tetrahedra
                             //   Vertices = new int[nrs][nverts[i]]
  public int[][] Walk;       // triangles/tetrahedra --> triangles/tetrahedra
                             //   Walk = new int[ntris][dim + 1]
  public int[][] Edges;      // tri/tetra edges --> global edge number
                             //   Edges = new int[ntris][3 * (dim - 1)];
  public int NumEdges;       // number of unique global edge numbers

> What is the method getNeighbours doing?  I am putting an 2D-array of
> floats in the the Irregular2D set, what is the int[][] array in get
> Neighbours? Does it somehow specify the indices,

IrregularSet.getNeighbors(int[][]) returns the neighboring sample points
for each sample point.  On input, "neighbors.length" must be greater
than or equal to "getLength()".  On output, "neighbors[i][j]" is the
index of the jth neighbor of sample point i.  I assume that each sample
point has, at most, 3 neighbors.

> which floats cooresponds to an triangle?
> Where can I find more Information about Irregular2D set?

At this point, I suggest that you start looking at the source code for
IrregularSet and Delaunay -- which is what I would have to do to answer
your questions.

I believe there are a couple of others on this list who know about
Delaunay triangulation.  Perhaps you'll hear from them.

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>


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