Dividing two sets of points using a straight line
问题 Suppose I have two sets of points, A and B, in 2D space. I want to know if there exists a single straight line that will have all points of A on one side and all points of B on the other, and if possible, find one such line. I found this question while searching but it is more of a "line of best fit" problem. Intuitively, I feel like it is a question regarding cross-products but I can't figure out how it can be done. 回答1: You could find the convex hull for each set of points, and then follow