Dual Algorithm

Input is an arrangement of lines Q.

1. Pick a line P such that the slope of P is minimized in the set Q. If there are several lines with the same slope then pick the line with the greatest y-intercept.

2. Compute the intersections of P with all the other lines in Q. Keep a record of the x-coordintes of the intersections.

3. Pick the point of intersection with line P such that the x-coordinate of the intersection is minimum.

4. That point belongs to the upper envelope, and the segment of P upto that intersection point is on the upper envelope.

5. Call the line to which the point belongs P.

6. At step i, compute the intersections of all the lines with the line P.

7. Choose that intersection of one of the lines with line P which has no other intersections above it. Call the line which produced intersection Q.

8. Check if the slope of Q is maximum.

9. If not jump to 6, else you have computed the upper envelope.

Please enable Java for an interactive construction (with Cinderella).


NEXT


Beenish Chaudry
Last modified: Tue Apr 4 03:15:08 EDT 2000