Hacker News new | past | comments | ask | show | jobs | submit login

It's literally a difference of coordinates, not an intersection. Take all pairs of points in the (filled) polygons A and B, subtract their coordinates, and include the difference in A-B.

If there is an intersection, there is at least one pair that consists of the same point twice; the difference of coordinates will be (0,0) and therefore, if there is an intersection then A-B contains the origin.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: