#### Elif Tosun 274b-ab Spring 2000 CSC 274 Computational Geometry

Back to 274b-ab homepage

### Computing Upper Envelope using Incremental Algorithm

The Problem:

The Goal is to compute the upper envelope of a set of lines, using an already defined algorithm used for computing CH for a set of points.
The problem is to find out which entries of the "dictionary" will be used to this at each step of the algorithm.

The "Known" Incremental Algorithm for Computing Convex Hull

*Start w/ a set of pts.
*Sort points by x-coord
*Take the first 3 to form a triangle
*Add new pts in order
--- At each step compute tangents to find the new CH
--- Repeat for all points.

Slight modification for computing lower CH

*Sort pts by x-coord
*Add points one by one
-- if the next pt in order is above p0, ignore and move to the next.
-- For the first two available points draw the connecting line
-- For each point:

if (line pi, pi-1 has pts below it)
try forming lines w/ prev points
take the line that doesn't have any points below

else
draw line (pi, pi-1);

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

After transforming the steps of the algorithm using the duality dictionary, this is what we get for the algorithm of uper envelope

*Take the intersection point oof the first line and the next avaialble one.
*For each line:
if (there are other prev intersection pts above that of li, li-1)
try intersection pts with different lines;
take the one taht doesn't have any other pts above it;}
else
add that pt to the upper envelope

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

For more detailed presentation slides, check here