in 3D,we can test |(p2-p1)*(p3-p1)|==0,where p1,p2,p3 are 3D-vectors
that represent the three points.
in n-dimension,i think we can let A=(a1,a2,...,an)=p2-p1, and
B=(b1,b2,...,bn)=p3-p1, and test every elements of the matrix (ATB-
BTA). That is ai*bj-aj*bi.

On 5月27日, 上午7时22分, Feng <[EMAIL PROTECTED]> wrote:
> Hi all!
>
> Given 3 points in 3D, what is the fast and numerically stable way to
> test if they form a triangle?
>
> I am thinking computing the determinant of the square matrix formed by
> the 3 points and testing if the determinant is nonzero. But I am not
> sure.
>
> What about the case for high dimensions, i.e. 4D, 5D ...
>
> Thanks!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to