Linear Algebra for Programmers

1 min read Original article ↗

Barycentric coordinates


Given a triangle on a 2d-plane with vertices [x1,y1], [x2,y2] and [x3,y3], and given a point [x,y], how can you find out whether the point is inside or outside the triangle?