[algogeeks] Re: Testing if 3 points form a triangle

2007-06-17 Thread kunzmilan
On Jun 4, 10:56 pm, Feng [EMAIL PROTECTED] wrote: Hi Kunzmilan, thanks for your idea of using distance matrices. But one of my friends came up with a seemly counter-example: Take 3 collinear points in 2D: (0,0), (1,0), (2,0). The distance matrix is: 0 1 4 1 0 1 4 1 0, whose eigenvalues

[algogeeks] Re: Testing if 3 points form a triangle

2007-06-09 Thread BiGYaN
On Jun 5, 1:45 am, Feng [EMAIL PROTECTED] wrote: Hi BiGYaN, triangle is a 2D object which can be formed by any 3 non- collinear points. It can exist in 4D, just like a point existing in 3D. On May 31, 2:11 am, Victor Carvalho [EMAIL PROTECTED] wrote: Feng, how can form a triangle in

[algogeeks] Re: Testing if 3 points form a triangle

2007-06-04 Thread Feng
Hi BiGYaN, triangle is a 2D object which can be formed by any 3 non- collinear points. It can exist in 4D, just like a point existing in 3D. On May 31, 2:11 am, Victor Carvalho [EMAIL PROTECTED] wrote: Feng, how can form a triangle in four dimensions??? 2007/5/29, BiGYaN [EMAIL PROTECTED]:

[algogeeks] Re: Testing if 3 points form a triangle

2007-06-04 Thread nima aghdaie
use the cross product to examine whether they're collinear. points A,B,C: AB*BC =? 0 On 5/27/07, 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

[algogeeks] Re: Testing if 3 points form a triangle

2007-05-31 Thread Victor Carvalho
Feng, how can form a triangle in four dimensions??? 2007/5/29, BiGYaN [EMAIL PROTECTED]: Just test whether they are collinear or not i.e. get the slopes, m1 from 1st and 2nd point m2 from 2nd and 3rd point if m1==m2 then they do not form a triangle else they do Computing the area

[algogeeks] Re: Testing if 3 points form a triangle

2007-05-29 Thread BiGYaN
Just test whether they are collinear or not i.e. get the slopes, m1 from 1st and 2nd point m2 from 2nd and 3rd point if m1==m2 then they do not form a triangle else they do Computing the area of the triangle and testing for 0 might also work but I feel that the computation will be

[algogeeks] Re: Testing if 3 points form a triangle

2007-05-27 Thread [EMAIL PROTECTED]
In 3D, we can test |(p2-p1)*(p3-p1)|==0, where p1,p2 and p3 are vectors. 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

[algogeeks] Re: Testing if 3 points form a triangle

2007-05-27 Thread [EMAIL PROTECTED]
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