Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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.

share|improve this question
1  
What's the radius of a rectangle?? –  Hans Lundmark Jan 15 '12 at 8:37
1  
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
add comment

1 Answer 1

1 point is not enough to determine a unique rectangle. If the radius of a rectangle means the distance of a point on the perimeter of a rectangle from its center in terms of the angle anticlockwise from the horizontal, and the rectangle has a corner (x,y) and centre (0,0) and sides parallel to the x and y axis, then

$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$

share|improve this answer
    
are those fors comparable to for loops in programming? –  about blank Jan 15 '12 at 9:14
    
No, it describes a case distinction. In fact, in programming terms, you can read it as an "if" statement. –  Johannes Kloos Mar 15 '12 at 9:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.