Department of Computer Science | Institute of Theoretical Computer Science | CADMO

Theory of Combinatorial Algorithms

Prof. Emo Welzl and Prof. Bernd Gärtner

// Program: draw_circle.C // Draws a point and a circle around it in a window #include #include int main() { // center: in the middle of the window // radius: up to the window boundary int cx = (ifm::wio.xmax() - ifm::wio.xmin()) / 2; int cy = (ifm::wio.ymax() - ifm::wio.ymin()) / 2; int r = cx; // output the center ifm::wio << ifm::Point(cx, cy); // output the circle ifm::wio << ifm::Circle(cx, cy, r); ifm::wio.wait_for_mouse_click(); return 0; }