No.11404484 ViewReplyOriginalReport
Can you /sci/ bros prove my hypothesis?
I came up with the algorithm to check if a point is contained within a triangle:

Prerequisites:
- The triangle is defined by three Cartesian points A, B, and C
- The point is also a Cartesian point P

Algorithm:
1) Create three triangles ABP, ACP, BCP
2) Calculate their areas a, b, and c respectively
3) Calculate the area of the original triangle ABC as d
4) If a+b+c <= d then the point is contained, else not

I can intuitively prove it but I don't have the mathematical vocabulary for a formal proof.
Just a fun thought experiment, if you know any more efficient methods post 'em.

Pic rel. is a computer demo I wrote to test this.