Next: Polygons ( POLYGON ) Up: Basic Data Types for Previous: Straight Lines ( line   Contents   Index

# Circles ( circle )

Definition

An instance C of the data type circle is an oriented circle in the plane passing through three points p1, p2, p3. The orientation of C is equal to the orientation of the three defining points, i.e. orientation(p1, p2, p3). If |   {p1, p2, p3}   |= 1 C is the empty circle with center p1. If p1, p2, p3 are collinear C is a straight line passing through p1, p2 and p3 in this order and the center of C is undefined.

#include < LEDA/geo/circle.h >

Types

 circle::coord_type the coordinate type (double). circle::point_type the point type (point).

Creation

 circle C(const point& a, const point& b, const point& c) introduces a variable C of type circle. C is initialized to the oriented circle through points a, b, and c. circle C(const point& a, const point& b) introduces a variable C of type circle. C is initialized to the counter-clockwise oriented circle with center a passing through b. circle C(const point& a) introduces a variable C of type circle. C is initialized to the trivial circle with center a. circle C introduces a variable C of type circle. C is initialized to the trivial circle with center (0, 0). circle C(const point& c, double r) introduces a variable C of type circle. C is initialized to the circle with center c and radius r with positive (i.e. counter-clockwise) orientation. circle C(double x, double y, double r) introduces a variable C of type circle. C is initialized to the circle with center (x, y) and radius r with positive (i.e. counter-clockwise) orientation. circle C(const circle& c, int) introduces a variable C of type circle. C is initialized to a copy of c. The second argument is for compatability with rat_circle.

Operations