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.

ool collinear(const point& a, const point& b, const point& c)<br />

returns true if points a, b, c are collinear, i.e.,<br />

orientation(a, b, c) = 0, and false otherwise.<br />

bool right turn(const point& a, const point& b, const point& c)<br />

returns true if points a, b, c form a righ turn, i.e.,<br />

orientation(a, b, c) < 0, and false otherwise.<br />

bool left turn(const point& a, const point& b, const point& c)<br />

returns true if points a, b, c form a left turn, i.e.,<br />

orientation(a, b, c) > 0, and false otherwise.<br />

int side of halfspace(const point& a, const point& b, const point& c)<br />

returns the sign of the scalar product (b − a) · (c − a).<br />

If b ≠ a this amounts to: Let h be the open halfspace<br />

orthogonal to the vector b − a, containing b, and having<br />

a in its boundary. Returns +1 if c is contained in h,<br />

returns 0 is c lies on the the boundary of h, and returns<br />

−1 is c is contained in the interior of the complement of<br />

h.<br />

int side of circle(const point& a, const point& b, const point& c, const point& d)<br />

returns +1 if point d lies left of the directed circle<br />

through points a, b, and c, 0 if a,b,c,and d are cocircular,<br />

and −1 otherwise.<br />

bool inside circle(const point& a, const point& b, const point& c, const point& d)<br />

returns true if point d lies in the interior of the circle<br />

through points a, b, and c, and false otherwise.<br />

bool outside circle(const point& a, const point& b, const point& c, const point& d)<br />

returns true if point d lies outside of the circle through<br />

points a, b, and c, and false otherwise.<br />

bool on circle(const point& a, const point& b, const point& c, const point& d)<br />

returns true if points a, b, c, and d are cocircular.<br />

bool cocircular(const point& a, const point& b, const point& c, const point& d)<br />

returns true if points a, b, c, and d are cocircular.<br />

int compare by angle(const point& a, const point& b, const point& c,<br />

const point& d)<br />

compares vectors b−a and d−c by angle (more efficient<br />

than calling compare by angle(b − a, d − x) on vectors).<br />

bool affinely independent(const array& A)<br />

decides whether the points in A are affinely independent.

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

Saved successfully!

Ooh no, something went wrong!