Final answer:
Write a program to solve the point location problem using a binary tree data structure, optimizing line checks to be proportional to log N. The program should include functions for geometrical calculations and be modularly divided into Point.java, LineSegment.java, and PointLocator.java.
Step-by-step explanation:
The task is to write a program that solves the point location problem with a set of lines in a plane, using a data structure allowing quick determination if any line goes between two points, optimizing the process to be proportional to log N instead of testing against all N lines. The input involves an integer N followed by N line segments, defined by four coordinates representing the endpoints. A binary tree structure mimicking a 2D tree is suggested for organizing the data, with internal nodes representing line segments and external nodes representing regions in the plane.
For the computational geometry required, one would need a function to test whether a point is on one side of a line or the other (the ccw function) and a routine to calculate the intersection point of two lines, considering precision and potential degenerate cases. The output should indicate whether two query points are separated by a line, displaying such a line and providing statistical data regarding the tree's structure. The program will be split into modular classes such as Point.java, LineSegment.java, and PointLocator.java for better organization and clarity.