31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

void T.draw edge(edge e, void (∗draw diagram edge)(const POINT & , const POINT & ),<br />

void (∗draw triang edge) (const POINT & , const POINT & ),<br />

void (∗draw hull dart) (const POINT & , const POINT & ))<br />

calls draw diagram edge(pos source(e), pos target(e) if e is a diagram<br />

dart, draw hull dart(pos source(e), pos target(e) if e is a hull dart, and<br />

draw triang edge(pos source(e), pos target(e) if e is a non-diagram edge.<br />

void T.draw edges(void (∗draw diagram edge)(const POINT & , const POINT & ),<br />

void (∗draw triang edge) (const POINT & , const POINT & ),<br />

void (∗draw hull dart) (const POINT & , const POINT & ))<br />

calls the corresponding function for all edges of T .<br />

void T.draw edges(const list& L, void (∗draw edge)(const POINT & ,<br />

const POINT & ))<br />

calls draw edge(pos source(e), pos target(e) for every edge e ∈ L.<br />

void T.draw voro edges(void (∗draw edge)(const POINT & , const POINT & ),<br />

void (∗draw ray) (const POINT & , const POINT & ))<br />

calls draw edge and draw ray for the edges of the Voronoi diagram.<br />

void T.draw hull(void (∗draw poly)(const list& ))<br />

calls draw poly with the list of vertices of the convex hull.<br />

void T.draw voro(const GRAPH & ,<br />

void (∗draw node)(const POINT & ),<br />

void (∗draw edge)(const POINT & , const POINT & ),<br />

void (∗draw ray) (const POINT & , const POINT & ))<br />

calls ...<br />

4. Implementation<br />

<strong>The</strong> main ingredients for the implementation are Delaunay flipping, segment walking, and<br />

plane sweep.<br />

<strong>The</strong> constructor POINT SET (list S) first constructs a triangulation of S by<br />

sweeping and then makes the triangulation Delaunay by a sequence of Delaunay flips.<br />

Locate walks through the triangulation along the segment from some fixed point of T to<br />

the query point. Insert first locates the point, then updates the triangulation locally, and<br />

finally performs flips to reestablish the Delaunay property. Delete deletes the node, retriangulates<br />

the resulting face, and then performs flips. Nearest neighbor searching, circular<br />

range queries, and triangular range queries insert the query point into the triangulation,<br />

then perform an appropriate graph search on the triangulation, and finally remove the<br />

query point.<br />

All algorithms show good expected behavior.<br />

For details we refer the reader to the <strong>LEDA</strong> implementation report ”Point Sets and<br />

Dynamic Delaunay Triangulations”.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!