Solution (source code)

= Solution

Translate and scale the circle to $|z|=1$. For distinct points $u,v,w$ on it, the angle at $w$ is right exactly when
$$
R=\frac{u-w}{v-w}
$$
is purely imaginary. Since $\bar u=u^{-1}$ and similarly for $v,w$, direct simplification gives $\bar R=(v/u)R$. Thus $\bar R=-R$ exactly when $v=-u$, which says that the opposite side joins antipodal points and is a diameter. The converse is the same calculation in reverse.