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 are -4, -0.4495, 4.4495. It means that they form a 2D shape, but they make a line (1D shape). Is there anything wrong in it? On May 28, 6:35 am, kunzmilan <[EMAIL PROTECTED]> wrote: > On May 27, 1:22 am,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 forhighdimensions, i.e. 4D, 5D ... > > Distance matrices with elements m(i,j) = squared Euclidean distance > have (d + 1) nonzero eigenvalues, where d is the dimensionality of the > figure, points are embedded in (2 nonzero eigenvalues linear shape, 3 > nonzero eigenvalues planar shape, etc.) > kunzmilan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---