void drawLine(line l) { if (l.isDiameter()) { glBegin(GL_LINE_STRIP); glVertex2d(l.getLeft().getX(), l.getLeft().getY()); glVertex2d(l.getRight().getX(), l.getRight().getY()); glEnd(); return; } double middle = l.getCenter().arg() + M_PI; double deflection = atan(1/l.getRadius()); double start = middle - deflection; double end = middle + deflection; drawArc(l.getCenter(), l.getRadius(), start, end); }
line transform::operator ()(line l){ return line(l.getLeft().mobius(c).rotate(th), l.getRight().mobius(c).rotate(th)); }