184
правки
Изменения
→Псевдокод
Insert edge(<tex>v_{i}</tex>, <tex>helper(e_{j})</tex>) in <tex>D</tex>
<tex>helper(e_{j}) \leftarrow v_i</tex>
HandleRegularVertex(<tex>v_{i}</tex>)
if (interior of <tex>P</tex> lies to the right of <tex>v_{i}</tex>)
then
if (Type_of_vertex(<tex>helper(e_{i})</tex> = 'merge')
Insert edge(<tex>v_{i}</tex>, <tex>helper(e_{i})</tex>) in <tex>D</tex>
Delete <tex>e_{i-1}</tex> from <tex>T</tex>
Insert <tex>e_{i}</tex> in <tex>T</tex>
<tex>helper(e_{i}) \leftarrow v_i</tex>
else
edge <tex>e_j</tex> = <tex>l \cap P</tex>
Search <tex>e_j</tex> in <tex>T</tex>
if (Type_of_vertex(<tex>helper(e_{j})</tex> = 'merge')
Insert edge(<tex>v_{i}</tex>, <tex>helper(e_{j})</tex>) in <tex>D</tex>
<tex>helper(e_{j}) \leftarrow v_i</tex>
==== Триангуляция монотонного многоугольника ====