Point within a TriangleDate: 05/29/2003 at 13:27:06 From: Venu Subject: Equilateral Triangles I have the coordinates of the three corners of a equilateral triangle ABC. How can I decide whether an arbitrary point (X,Y) lies in the plane of the triangle? Date: 05/29/2003 at 15:29:53 From: Doctor George Subject: Re: Equilateral Triangles Hi Venu, Thanks for writing to Doctor Math. Let's call your vertices A, B and C. Now assign a direction to the sides of the triangle by referring to vectors AB, BC, and CA. Note that the vectors form a loop around the triangle. Now let's call your point P, define vectors AP, BP, and CP, and compute the following vector cross products. AP x AB BP x BC CP x CA If all three of these vectors are in the same direction then P is in triangle ABC. If P crosses over any side of the triangle then the cross product using that side will switch direction. Does that make sense? Write again if you need more help. - Doctor George, The Math Forum http://mathforum.org/dr.math/ |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]
Ask Dr. Math^{TM}
© 1994- The Math Forum at NCTM. All rights reserved.
http://mathforum.org/dr.math/