def circumcircle(u, v, w):
    """find the center/radius of circumcircle of triangle uvw"""
    vu, wv, uw = (u - v), (v - w), (w - u)
    d = 2 * ((u - v).crs(v - w)).dot((u - v).crs(v - w))
    a = (v - w).dot(v - w) * (u - v).dot(u - w) / d
    b = (u - w).dot(u - w) * (v - u).dot(v - w) / d
    c = (u - v).dot(u - v) * (w - u).dot(w - v) / d
    o = u * a + v * b + w * c
    r = (u - o).mag()
    return o, r