Loren P Meissner <[log in to unmask]> wrote:
> I always thought it is MUCH harder to find out WHICH triangle a point is
> in. If you have a quick algorithm for "is P in [abc]" you still have to
> do a search among all the [abc] triangles.
>
> Of course you can narrow down the search by sorting the coordinates of
> the mesh points and only testing ones that "span" the point in question.
That's a good start. If you also have your triangles in a data structure
such that each triangle has three pointers to adjacent triangles, when
your "not in this triangle" test fails, you go across the failing edge
to the next triangle, and so on. This avoids testing many triangles.
--
Van Snyder | What fraction of Americans believe
[log in to unmask] | Wrestling is real and NASA is fake?
Any alleged opinions are my own and have not been approved or disapproved
by JPL, CalTech, NASA, Sean O'Keefe, George Bush, the Pope, or anybody else.
> -----Original Message-----
> From: Fortran 90 List [mailto:[log in to unmask]] On Behalf
> Of Alvaro Fernandez
> Sent: Thursday, May 15, 2003 6:04 AM
> To: [log in to unmask]
> Subject: Re: Slightly OT: Delaunay triangulation
>
> Yes, a way to know if a point is inside a triangle. Once that happens, I
> know which triangle to evaluate.
>
> Alvaro
|