Figure 1: Values r and q for a line L1 going through two points P1 and P2.