at my university, we're doing a project with kinetic datastructures right now, and for that, I need to know at which time point 4 given points become co-circular (in a position such that they are all on one circle).
Let $p_i, p_k, p_j, p_l$ be those points, which form at least a convex quadrilateral (that is guaranteed at this point).
We determined that one way to determine co-circularity is that the sum of opposing inner angles must reach $\pi$. For the opposing angles $\angle d,a,b$ and $\angle b,c,d$.
To simplify calculations, we limit ourselves to the cosine of the angles:
So: $$\cos \angle p_i p_k p_j = 1 - \cos \angle p_i p_l p_j$$
Then, we apply the law of cosines:
$$\cos \angle p'_i p'_k p'_j = \frac{{dist}^2(p'_i,p'_k) + {dist}^2(p'_i,p'_j) - {dist}^2(p'_j,p'_k)} {{dist}(p'_i,p'_k) \cdot {dist}(p'_i,p'_j)}$$
(The other side is similar)
Now, expanding the dist functions, we get:
$$\cos \angle p_i p_k p_j = \frac{\rho^2(x_i-x_k)^2 + (y_i-y_k)^2 + \rho^2(x_j-x_k)^2 + (y_j-y_k)^2 - \rho^2(x_i-x_j)^2 - (y_i-y_j)^2} {\sqrt{\rho^2(x_i-x_k)^2 + (y_i-y_k)^2} \cdot \sqrt{\rho^2(x_j-x_k)^2 + (y_j-y_k)^2}}$$
$$\cos \angle p_i p_l p_j = \frac{\rho^2(x_i-x_l)^2 + (y_i-y_l)^2 + \rho^2(x_j-x_l)^2 + (y_j-y_l)^2 - \rho^2(x_i-x_j)^2 - (y_i-y_j)^2} {\sqrt{\rho^2(x_i-x_l)^2 + (y_i-y_l)^2} \cdot \sqrt{\rho^2(x_j-x_l)^2 + (y_j-y_l)^2}}$$
$\rho$ is the scaling factor.
Replacing these in the first equation, and factoring out $\rho$ where possible:
$$\frac{\rho^2(x_i-x_k)^2 + (y_i-y_k)^2 + \rho^2(x_j-x_k)^2 + (y_j-y_k)^2 - \rho^2(x_i-x_j)^2 - (y_i-y_j)^2} {\sqrt{\rho^2(x_i-x_k)^2 + (y_i-y_k)^2} \cdot \sqrt{\rho^2(x_j-x_k)^2 + (y_j-y_k)^2}} = \\ 1- \frac{\rho^2(x_i-x_l)^2 + (y_i-y_l)^2 + \rho^2(x_j-x_l)^2 + (y_j-y_l)^2 - \rho^2(x_i-x_j)^2 - (y_i-y_j)^2} {\sqrt{\rho^2(x_i-x_l)^2 + (y_i-y_l)^2} \cdot \sqrt{\rho^2(x_j-x_l)^2 + (y_j-y_l)^2}}$$
Aaand... that's where I got stuck. Algebra has never been one of my strong points.
All those $x_i$ and $y_i$ are known, but I need to know $\rho$.
I resolved it once, but then noticed I'd factored out the $\rho$ from the square roots, without noticing that the part with the y-coordinates did not have a $\rho$ factor. Now I'm not sure how to get it out of the square roots.
How to I determine $\rho$? (Or at the very least, I how do I get rid of those square roots?)