# Finding the radius of a rectangle based on a given x,y coordinate.

Is it possible to find the radius of a rectangle based on a given x and y coordinate?

If so, how is the achieved.

I'm trying to create a rectangle in C++ ( using OpenGL ), and would like to obtain the formula for the radius of a Rectangle based on its center.

-
What's the radius of a rectangle?? –  Hans Lundmark Jan 15 '12 at 8:37
It would be really helpful to have a specific example of what you know and what you want to know—a picture showing which measurements you know and what point and measurements you're trying to find would probably help a lot. –  Isaac Jan 15 '12 at 17:12

$r=\frac{y}{\sin \theta}$ for $a\leq\theta\leq \pi-a$ or $\pi+a\leq\theta\leq 2\pi-a$
$r=\frac{x}{\cos \theta}$ for $\pi -a\leq\theta\leq \pi+a$ or $-a\leq\theta\leq a$