anyone got an idea for point in triangle code?
Posted: Sat Dec 13, 2008 3:00 pm
i know there are probably hundreds of articles online, but sometimes its just better to try on your own.
i came up with this idea (though im sure it was thought of 100's of years ago by someone with a funny last name)
you have the normals of each line, and if the point to the normal vector and the normal vector have a angle greater than 90 degrees between them they point is out side of the triangle. this method is computation heavy so if anyone had other ideas let me know.
this algo can be sped up quite alot by tabulating the trig functions.
i came up with this idea (though im sure it was thought of 100's of years ago by someone with a funny last name)
you have the normals of each line, and if the point to the normal vector and the normal vector have a angle greater than 90 degrees between them they point is out side of the triangle. this method is computation heavy so if anyone had other ideas let me know.
this algo can be sped up quite alot by tabulating the trig functions.