Connect(k,m,S) |
Main Convex Hull Algorithm |

2a. Let I and J be the indices of points contained in a supporting line of S, such that x(p**I**) is less than or equal to A, and x(p**J**) is greater than A.

3a. Let S**left** be the set of points of S with x-values less than x(p**I**), union with p**I**. Similarly let S**right** contain the points in S with x-values greater than x(p**J**), union with p**J**.

4a. If I=k, output I...else call CONNECT(k,I,S**left**).

5a. If J=m, output J...else call CONNECT(J,m,S**right**).