vardef tangent_times(expr C, p) = save m, a, b, G, H; pair m; numeric a, b; path G, H; m = 1/2[p, center C]; H = halfcircle scaled abs (p - center C) rotated angle (p - center C) shifted m; G = H rotatedabout(m, 180); (a, whatever) = C intersectiontimes H; (b, whatever) = C intersectiontimes G; (a, b if b < a: + 8 fi) enddef;