PROJECT EULER · #0102
Triangle Containment
Three distinct points are plotted at random on a Cartesian plane, for which
Consider the following two triangles:
It can be verified that triangle
Using triangles.txt (right click and 'Save Link/Target As...'), a 27K text file containing the co-ordinates of one thousand "random" triangles, find the number of triangles for which the interior contains the origin.
NOTE: The first two examples in the file represent the triangles in the example given above.
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.