best way to...

Started by
2 comments, last by Infinisearch 21 years, 2 months ago
What is the most efficient way given three arbitrary 3D coordinates, to determine if they form a right triangle? Also is there a proper name for this aka something to google for without getting 8billion hits? Thanks in advance

-potential energy is easily made kinetic-

Advertisement
lato.acadiau.ca/courses/math/mendivil/math2013/test1_01_soln.pdf+vector+math+perpendicular+test&hl=en&ie=UTF-8">A possiblity

Good Luck! Post back if that helps.

[edit]
Well that link blows: search look for vector perpendicular test

[edited by - CodeJunkie on March 1, 2003 3:01:12 AM]

Here's one

[edited by - CodeJunkie on March 1, 2003 3:07:34 AM]

Here's an idea:

Probably not a fast way but what the hell??
calculate each sides distance and see if the the sum of squares of the smaller sides equal the square of the larger side

[edited by - CodeJunkie on March 1, 2003 3:15:57 AM]

Finally Perpendicular Vectors

[edited by - CodeJunkie on March 1, 2003 4:01:03 AM]
make 2 pairs of 2 vectors from the coords....

say coords are (x1,y1) (x2,y2) (x3,y3)

then the paired vectors could be

1. (x2-x1,y2-y1) & (x3-x1, y3-y1)
2. (x3-x2,y3-y2) & (x1-x2, y1-y2)

then get the dot product of these vector pairs and if one of these is equal to 90 degrees, or both of them added equal 90 degrees then u have a right angled triangle.

goodbye.
Cool! Thanks Kuladus.

This topic is closed to new replies.

Advertisement