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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

edge CONVEX COMPONENTS(const gen polygon& GP,<br />

GRAPH & G,<br />

list& inner edges, list& boundary edges,<br />

list& hole edges)<br />

if GP is a bounded and non-trivial generalized polygon, its interior is<br />

decomposed into convex parts. All inner edges of the constructed decomposition<br />

are returned in inner edges. boundary edges contains the edges<br />

of every counter-clockwise oriented boundary cycle of GP, and hole edges<br />

contains the edges of every clockwise oriented boundary cycle of GP.<br />

Note that the reversals of boundary and hole edges will be stored in<br />

inner edges. <strong>The</strong> function returns an edge of the convex hull if GP is a<br />

bounded and non-trivial and nil otherwise. Precondition: GP must be<br />

simple.<br />

list TRIANGLE COMPONENTS(const gen polygon& GP)<br />

triangulates the interior of generalized polygon GP and returns the result<br />

of the triangulation as a list of polygons.<br />

list CONVEX COMPONENTS(const gen polygon& GP)<br />

if GPis a bounded and non-trivial generalized polygon, its interior is<br />

decomposed into convex parts. <strong>The</strong> function returns a list of polygons<br />

that form the convex decomposition of GPs interior.<br />

• Minkowski Sums<br />

Please note that the Minkowski sums only work reliable for the rational kernel.<br />

gen polygon MINKOWSKI SUM(const polygon& P, const polygon& R)<br />

computes the Minkowski sum of P and R.<br />

gen polygon MINKOWSKI DIFF(const polygon& P, const polygon& R)<br />

computes the Minkowski difference of P and R, i.e. the Minkowski sum<br />

of P and R.reflect(point(0, 0)).<br />

gen polygon MINKOWSKI SUM(const gen polygon& P, const polygon& R)<br />

computes the Minkowski sum of P and R.<br />

gen polygon MINKOWSKI DIFF(const gen polygon& P, const polygon& R)<br />

computes the Minkowski difference of P and R, i.e. the Minkowski sum<br />

of P and R.reflect(point(0, 0)).<br />

<strong>The</strong> following variants of the MINKOWSKI functions take two additional call-back function<br />

arguments conv partition and conv unite which are used by the algorithm to partition<br />

the input polygons into convex parts and for computing the union of a list of convex polygons,<br />

respectively (instead of using the default methods).

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

Saved successfully!

Ooh no, something went wrong!