# Thread: Finding the one edge of the rectangle

1. ## Finding the one edge of the rectangle

Hello ,

I want to find the rectangle one edge "a" (ie. x and y points of the "a" edge) I know the

rectangle width
rectangle height
and circle mid point
How to find the edge "a" x and y points?

The rectangle will be rotated on the circle , so the rectangle center point always touch the circle boundry. For different positions of rectangle I have to calculate edge "a" x and y points.

2. Originally Posted by kumar
Hello ,

I want to find the rectangle one edge "a" (ie. x and y points of the "a" edge) I know the

rectangle width
rectangle height
and circle mid point
How to find the edge "a" x and y points?

The rectangle will be rotated on the circle , so the rectangle center point always touch the circle boundry. For different positions of rectangle I have to calculate edge "a" x and y points.

You didn't give us the coordinate system you are refering to. So I'm guessing:

Let C denote the center of the circle, w the width of the rectangle and r the radius of the given circle.

Then the vertex A is placed on a circle around C with the radius $R_A = \sqrt{r^2 + \left(\dfrac12 w\right)^2}$

3. Based on the user given angle I have to place the rectangle on the circle( see the diagram). For drawing rectangle I need that starting point ie. x,y points bottom left of the rectangle(edge "a"). how to calculate that points.