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.

at circle C(const circle& c, int prec = rat point :: default precision);<br />

4. Operations<br />

introduces a variable C of type rat circle. C is initialized to<br />

the circle obtained by approximating three defining points of<br />

c.<br />

circle C.to float( ) returns a floating point approximation of C.<br />

void C.normalize( ) simplifies the homogenous representation by normalizing<br />

p 1 , p 2 , and p 3 .<br />

int C.orientation( ) returns the orientation of C.<br />

rat point C.center( ) returns the center of C.<br />

Precondition: C has a center, i.e., is not a line.<br />

rat point C.point1( ) returns p 1 .<br />

rat point C.point2( ) returns p 2 .<br />

rat point C.point3( ) returns p 3 .<br />

rational C.sqr radius( ) returns the square of the radius of C.<br />

rat point<br />

C.point on circle(double alpha, double epsilon)<br />

returns a point p on C such that the angle of p<br />

differs from alpha by at most epsilon.<br />

bool C.is degenerate( ) returns true if the defining points are collinear.<br />

bool C.is trivial( ) returns true if C has radius zero.<br />

bool C.is line( ) returns true if C is a line.<br />

int C.side of(const rat point& p)<br />

bool C.inside(const rat point& p)<br />

bool C.outside(const rat point& p)<br />

bool C.contains(const rat point& p)<br />

returns −1, +1, or 0 if p lies right of, left of, or on<br />

C respectively.<br />

returns true iff p lies inside of C.<br />

returns true iff p lies outside of C.<br />

returns true iff p lies on C.<br />

rat circle<br />

C.translate(const rational& dx, const rational& dy)<br />

returns C translated by vector (dx, dy).

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

Saved successfully!

Ooh no, something went wrong!