Skip to main content

Rotate triangle 45° about (3,3)

Short answer

Translate pivot (3,3) to origin, rotate by 45°, translate back. Using x' = 3 + (x-3)cos45° - (y-3)sin45°, y' = 3 + (x-3)sin45° + (y-3)cos45°. Vertices: A(5,6)→(2.29,6.54), B(6,2)→(5.83,4.41), C(4,1)→(5.12,2.29).

Rotate a triangle A(5,6), B(6,2) and C(4,1) by 45 degree about an arbitrary pivot point (3,3).

Rotation about a pivot (xr, yr) = (3, 3) by θ = 45°: translate the pivot to the origin, rotate, translate back.

Composite matrix M = T(3,3) · R(45°) · T(−3,−3)

cos45° = sin45° = 0.7071

        | 1 0 3 | | 0.7071 -0.7071 0 | | 1 0 -3 |
M     = | 0 1 3 | | 0.7071  0.7071 0 | | 0 1 -3 |
        | 0 0 1 | | 0       0      1 | | 0 0  1 |

        | 0.7071 -0.7071  3.0000 |
M     = | 0.7071  0.7071 -1.2426 |
        | 0       0       1      |

Using x' = xr + (x − xr)cosθ − (y − yr)sinθ and y' = yr + (x − xr)sinθ + (y − yr)cosθ:

Point(x−3, y−3)Rotated about origin+ (3, 3) = new point
A(5,6)(2, 3)(2·0.7071 − 3·0.7071, 2·0.7071 + 3·0.7071) = (−0.707, 3.536)A'(2.29, 6.54)
B(6,2)(3, −1)(2.121+0.707, 2.121−0.707) = (2.828, 1.414)B'(5.83, 4.41)
C(4,1)(1, −2)(0.707+1.414, 0.707−1.414) = (2.121, −0.707)C'(5.12, 2.29)

Answer: A'(2.29, 6.54), B'(5.83, 4.41), C'(5.12, 2.29).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Graphics chapter 3 questions →