[Math] How to find the smallest enclosing circle for a rectangle

circlesgeometry

I have the four vertices of a rectangle. I need to find it's smallest enclosing circle. For example:

enter image description here

I need to find the radius of the circle.

Best Answer

There is only one such circle for a rectangle. If your rectangle has sidelengths $a$ and $b$, then the length of the diagonal (by the Pythagorean theorem) is $\sqrt{a^2+b^2}$. Since the diagonal is a diameter, the radius is just $\dfrac{\sqrt{a^2+b^2}}{2}$.

Related Question