# Thread: Rotate a rectangle with respect to a point

1. ## Rotate a rectangle with respect to a point

Hi,

I have two rectangles in the attached bmp. A blue rectangle and a red rectangle. The diagonal of the red rectangle makes an angle theta with the diagonal of the blue rectangle.

Will the diagonal of the red rectangle be parallel to the diagonal of the blue rectangle, if I rotate the diagonal of the red rectangle about the pivot point P(x1,y1) with the angle theta?

If that is not possible what should i do to make the diagonal of the red rectangle parallel to that of the blue rectanle

Manu

2. Originally Posted by ManuLi
Hi,

I have two rectangles in the attached bmp. A blue rectangle and a red rectangle. The diagonal of the red rectangle makes an angle theta with the diagonal of the blue rectangle.

Will the diagonal of the red rectangle be parallel to the diagonal of the blue rectangle, if I rotate the diagonal of the red rectangle about the pivot point P(x1,y1) with the angle theta?

If that is not possible what should i do to make the diagonal of the red rectangle parallel to that of the blue rectanle

Manu
Translation.
To keep the diagonals (or any lines) parallel with the original, you need to translate the image.

3. Hi aidan,

How can I translate the red rectangle with respect to the point P(x1,y1), so the the diagonals are parallel?

Is there any formula for that?

Manu