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.

<strong>The</strong> following functions are only available for gen polygons. <strong>The</strong>y have no counterpart for<br />

rat gen polygons or real gen polygons.<br />

gen polygon P.translate by angle(double alpha, double d)<br />

returns P translated in direction alpha by<br />

distance d.<br />

gen polygon<br />

P.rotate(const point& p, double alpha)<br />

returns P rotated by α degrees about p.<br />

gen polygon P.rotate(double alpha) returns P rotated by α degrees about the<br />

origin.<br />

double P.distance(const point& p)<br />

rat gen polygon P.to rational(int prec = −1)<br />

returns the Euclidean distance between P<br />

and p.<br />

returns a representation of P with rational<br />

coordinates with precision prec (cf. Section<br />

14.10).<br />

Iterations Macros<br />

forall polygons(p, P ) { “the boundary polygons of P are successively assigned to POLY-<br />

GON p” }

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

Saved successfully!

Ooh no, something went wrong!