예제 #1
0
파일: draw.cpp 프로젝트: shsty/Geometry
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);
}
예제 #2
0
line transform::operator ()(line l){
    return line(l.getLeft().mobius(c).rotate(th), l.getRight().mobius(c).rotate(th));
}