示例#1
0
文件: line.cpp 项目: shsty/Geometry
//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;
}
示例#2
0
文件: line.cpp 项目: shsty/Geometry
line::line(point a, ideal b){
    left = -b*(1 + a.abs2() - 2*b.conj()*a)/(1 + a.abs2() - 2*b*a.conj());
    right = b;
}
示例#3
0
文件: line.cpp 项目: shsty/Geometry
line::line(ideal a, point b){
    left = a;
    right = -a*(1 + b.abs2() - 2*a.conj()*b)/(1 + b.abs2() - 2*a*b.conj());
}