# square incribed in cricle

Printable View

• Feb 5th 2009, 08:00 AM
padfoot
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.
Thanks in advance.
• Feb 5th 2009, 08:20 AM
ADARSH
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:

Originally Posted by padfoot
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.
Thanks in advance.

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 $\theta = 45 degrees = \frac{\pi}{4}$. Thus x & y can be calculated:
$x = r \cdot cos\theta = r \cdot cos\frac{\pi}{4}$

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

So any coordinate with either the x or y coordinates equation to $r \cdot cos\frac{\pi}{4}$ or $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
Hello, padfoot!

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: . $P(x_1,y_1)$

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

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

The four vertices are: . $\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
padfoot
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
ADARSH
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)

If its second - Crush the question with your foot, "padfoot":D
• Feb 6th 2009, 04:57 AM
padfoot
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
ADARSH
The square will have diameter 2r
So
$\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; $\frac{r}{\sqrt{2}}$
• Feb 6th 2009, 07:17 AM
padfoot
I'm not sure how to apply that.

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

The answer is Yes.

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:

Originally Posted by padfoot
I'm not sure how to apply that.

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

The answer is Yes.

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 $E_1$ and $E_2$ must be located so that the condition is satisfied.
• Feb 6th 2009, 02:36 PM
padfoot
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
ADARSH
-(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 $\frac{r}{\sqrt{2}}$

- All points in the area between these two circles can be called E1 and E2
ie; $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
padfoot
Thanks a lot. It makes sense now. I have one doubt though.
Can't the two points E1 and E2 satisfy that condition but be part of two different squares ?
For example, is it possible to get a point E1 that lies on the line of a square S1 and E2 lie on a square S2 but not on S1 ?
I hope I'm not sounding like an idiot...
• Feb 7th 2009, 10:48 PM
ADARSH
-See every point that satisfies that condition can be called E1 or E2

-This does NOT mean that every point that satisfies it are part of same square they may not be so

-the thing that satisfies that condition is an area (of which every point ) is your answer(Happy)