Ejemplo n.º 1
0
//Construct the line with two points on it
line::line(point a, point b){
    complex u = a.conj()*b - a*b.conj();
    double v = ( (a - b) * (1 - a.conj()*b) ).abs();
    complex w = a.conj() * (1 + b.abs2()) - b.conj() * (1 + a.abs2());
    left = (u + v)/w;
    right = (u - v)/w;
}
Ejemplo n.º 2
0
void drawPoint(point p) {
    double size = 0.02*(1 - p.abs2());
    if (size * screenSize / 2 < 0.3) return;
    glBegin(GL_POLYGON);
    glVertex2d(p.getX()-size, p.getY()-size);
    glVertex2d(p.getX()-size, p.getY()+size);
    glVertex2d(p.getX()+size, p.getY()+size);
    glVertex2d(p.getX()+size, p.getY()-size);
    glEnd();
}
Ejemplo n.º 3
0
line::line(point a, ideal b){
    left = -b*(1 + a.abs2() - 2*b.conj()*a)/(1 + a.abs2() - 2*b*a.conj());
    right = b;
}
Ejemplo n.º 4
0
line::line(ideal a, point b){
    left = a;
    right = -a*(1 + b.abs2() - 2*a.conj()*b)/(1 + b.abs2() - 2*a*b.conj());
}