Tag Archives: javascript

Javascript: Is Point In Triangle

Excellent article on determining if a point is in a triangle. Point in triangle test I needed a javascript version of the Barycentric coordinate method. Here is the function: function is_in_triangle (px,py,ax,ay,bx,by,cx,cy){ //credit: http://www.blackpawn.com/texts/pointinpoly/default.html var v0 = [cx-ax,cy-ay]; var v1 … Continue reading

Posted in Uncategorized | Tagged , , , , | 5 Comments