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.

14.27 Point on Rational Circle ( r circle point )<br />

1. Definition<br />

An instance p of type r circle point is a point in the two-dimensional plane that can be<br />

obtained by intersecting a rational circle c and a rational line l (cf. Sections 14.14 and<br />

14.13). Note that c and l may intersect in two points p 1 and p 2 . Assume that we order<br />

these intersections along the (directed) line l. <strong>The</strong>n p is uniquely determined by a triple<br />

(c, l, which), where which is either first or second. Observe that the coordinates of p<br />

are in general non-rational numbers (because their computation involves square roots).<br />

<strong>The</strong>refore the class r circle point is derived from real point (see Section 14.17), which<br />

means that all operations of real point are available.<br />

#include < <strong>LEDA</strong>/geo/r circle segment.h ><br />

2. Types<br />

r circle point :: tag { first, second }<br />

3. Creation<br />

used for selecting between the two possible intersections of a circle<br />

and a line.<br />

r circle point p; creates an instance p initialized to the point (0,0).<br />

r circle point<br />

r circle point<br />

r circle point<br />

p(const rat point& rat pnt);<br />

creates an instance p initialized to the rational point rat pnt.<br />

p(const rat circle& c, const rat line& l, tag which);<br />

creates an instance p initialized to the point determined by<br />

(c, l, which) (see above).<br />

p(const real point& rp, const rat circle& c, const rat line& l, tag which);<br />

creates an instance p initialized to the real point rp.<br />

Precondition: rp is the point described by (c, l, which).<br />

4. Operations<br />

void p.normalize( ) simplifies the internal representation of p.<br />

rat circle p.supporting circle( ) returns a rational circle passing through p.<br />

rat line p.supporting line( ) returns a rational line passing through p.<br />

bool p.is rat point( ) returns true, if p can be converted to rat point. (<strong>The</strong><br />

value false means “do not know”.)

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

Saved successfully!

Ooh no, something went wrong!