| 33 | Q.first = A + normalize(u, rA); |
| 34 | Q.second = B + normalize(u, rB); } |
| 35 | void tangent_inner(C(A,rA), C(B,rB), PP(P), PP(Q)) { |
| 36 | point ip = (rA*B + rB*A)/(rA+rB); |
| 37 | assert(tangent(ip, A, rA, P.first, Q.first) == 2); |
| 38 | assert(tangent(ip, B, rB, P.second, Q.second) == 2); } |
| 39 | pair<point,double> circumcircle(point a, point b, point c) { |
| 40 | b -= a, c -= a; |
| 41 | point p = perp(b*norm(c)-c*norm(b))/2.0/cross(b, c); |