# square incribed in cricle

• Feb 5th 2009, 08:00 AM
square inscribed in circle
I have a problem here that I haven't been able to solve.
You're given a circle with radius r and a square is inscribed on it.
The center of the circle is at the origin and the edges of the square do not lie on coordinate axis. Given co-ordinates (x1,y1), tell whether the co-ordinates lie on any side of the square.
I hope my question is clear.
• Feb 5th 2009, 08:20 AM
I see you are a newbie very warm Welcome to the Forum :)

Hint: There can be infinite squares in a circle
• Feb 5th 2009, 08:52 AM
star_tenshi
Quote:

I have a problem here that I haven't been able to solve.
You're given a circle with radius r and a square is inscribed on it.
The center of the circle is at the origin and the edges of the square do not lie on coordinate axis. Given co-ordinates (x1,y1), tell whether the co-ordinates lie on any side of the square.
I hope my question is clear.

This is my interpretation of your question:
http://fc78.deviantart.com/fs40/f/20...e101d61f3b.jpg
since we know that it is a square inscribed in a circle centered at the origin, then $\displaystyle \theta = 45 degrees = \frac{\pi}{4}$. Thus x & y can be calculated:
$\displaystyle x = r \cdot cos\theta = r \cdot cos\frac{\pi}{4}$

$\displaystyle y = r \cdot sin\theta = r \cdot sin\frac{\pi}{4}$
$\displaystyle \Rightarrow x = y$

So any coordinate with either the x or y coordinates equation to $\displaystyle r \cdot cos\frac{\pi}{4}$ or $\displaystyle r \cdot sin\frac{\pi}{4}$ would lie on the edges of the square.

Hope it helps!
• Feb 5th 2009, 08:56 AM
star_tenshi
Please excuse my previous post. I looked at ADARSH's post and realized my mistake. There are infinitely many squares inscribed in a circle. I was just looking at a particular case.
• Feb 5th 2009, 09:35 AM
Soroban

I don't know what you're asking, but I'll take a guess.

Quote:

You're given a circle with radius r and a square is inscribed on it.
The center of the circle is at the origin.
Given co-ordinates (x1,y1) of one vertex, locate the other vertices.

Code:

                Y                 |               * * *           *    |    * P         * - - - + - - - o(x1,y1)       *|      |    * |*         |      |  r*  |       * |      | * θ  | *   - - * | - - - + - - - | * - - X       * |      O|      | *         |      |      |       *|      |      | *         * - - - + - - - *           *    |    *               * * *                 |

The coordinates of the one vertex is: .$\displaystyle P(x_1,y_1)$

$\displaystyle \text{Let }r\, = \,\text{distance }OP.$
$\displaystyle \text{Let }\theta \,=\,\angle POX,\,\text{ where }\tan\theta \,=\,\frac{y_1}{x_1}$

Then $\displaystyle P$ has coordinates: .$\displaystyle \left(r\cos\theta,\:r\sin\theta\right)$

The four vertices are: .$\displaystyle \bigg[r\cos\!\left(\theta + \frac{\pi}{2}n\right),\: r\sin\!\left(\theta + \frac{\pi}{2}n\right)\bigg]\;\text{ for }n = 0,1,2,3$

• Feb 5th 2009, 01:44 PM
Thanks for the replies. I tried to use it to solve the problem but unfortunately it didn't work out.
I'll try to tell the question here.

There is a circular island of radius r (centered at origin). The owner wants to build a square tower inscribed on it. Given two points E1 (x1,y1) and E2 (x2,y2) for entrance and exit, is it possible to build a tower such that the two points (E1 and E2) lie on the tower's foundation ?

Hopefully, it made more sense this time around.
• Feb 6th 2009, 02:30 AM
From your reply it seems either you are hesitating to give complete question or question is wrong(Worried)

If its first case - Dont worry we are not gonna spoon feed you(Shake)

• Feb 6th 2009, 04:57 AM
I just rephrased the question. I removed the unnecessary parts. If you guys are still having trouble understanding it, I'll post the original one.
• Feb 6th 2009, 06:21 AM
The square will have diameter 2r
So
$\displaystyle \sqrt{2r^2}= \text{side of square}$

Now ther can be infinite such squares(after rotating)
Locus of all such squares is a circle of radius equal to half the side of square ie; $\displaystyle \frac{r}{\sqrt{2}}$
• Feb 6th 2009, 07:17 AM
I'm not sure how to apply that.

I'll give an example.
r = 2
(x1,y1) = 1,1
(x2,y2) = 1,-1

You get this by taking the vertices of the square as A(2,0), B(0,2), C(-2,0), D(0,-2). The points (1,1) and (1,-1) lie on lines AB and AD respectively.
• Feb 6th 2009, 07:34 AM
earboth
Quote:

I'm not sure how to apply that.

I'll give an example.
r = 2
(x1,y1) = 1,1
(x2,y2) = 1,-1

You get this by taking the vertices of the square as A(2,0), B(0,2), C(-2,0), D(0,-2). The points (1,1) and (1,-1) lie on lines AB and AD respectively.

I've attached a sketch.

You easily can determine the area where the points $\displaystyle E_1$ and $\displaystyle E_2$ must be located so that the condition is satisfied.
• Feb 6th 2009, 02:36 PM
I'm sorry but I still didn't get it. How do you get the area where E1 and E2 must be located ?
• Feb 6th 2009, 11:31 PM
-(Wait)Since you didn't specify the real values of points to be checked we took it as (x,y)

- Since the square could be rotated we rotated it and hence(as in earboth's figure) every point of that area got included

-the mid point of a square inscribed in a circle is the point nearest to it

-Joining the midpoints of a particular side of a rotating square square we get a cicle of radius $\displaystyle \frac{r}{\sqrt{2}}$

- All points in the area between these two circles can be called E1 and E2
ie;$\displaystyle r^2 \ge x^2 +y^2 \ge \frac{r^2}{2}$

Every (x,y) satisfying above is your answer (except those for which either is 0)
• Feb 7th 2009, 05:51 AM