- Asked 2/25
- 2070 Asar · 8 marks
- 2078 Bhadra · 6 marks
Rotation about a pivot point
Short answer
Rotation about pivot (xr,yr) is M=T(xr,yr)*R(-theta)*T(-xr,-yr) with R(-theta)=[[cos theta, sin theta,0],[-sin theta, cos theta,0],[0,0,1]]. Thus x'=xr+(x-xr)cos theta+(y-yr)sin theta, y'=yr-(x-xr)sin theta+(y-yr)cos theta; for counter-clockwise replace theta by -theta.
Derive the 2D transformation matrix for rotating an object by angle θ about a pivot point (xr, yr) (composite matrix for rotation about an arbitrary point, clockwise).
To rotate an object about a pivot point (xr, yr), the pivot is first moved to the origin, the object is rotated about the origin, and then the pivot is moved back. This is a composite transformation of three basic transformations.
Basic matrices (homogeneous, column vectors)
For clockwise rotation by θ, the angle is −θ in the standard (counter-clockwise positive) convention:
Rotation about origin, clockwise θ:
R(−θ) = | cosθ sinθ 0 |
| −sinθ cosθ 0 |
| 0 0 1 |
Translation T(tx, ty) = | 1 0 tx |
| 0 1 ty |
| 0 0 1 |
Steps
- Translate the pivot to the origin: T(−xr, −yr)
- Rotate about the origin: R(−θ)
- Translate back: T(xr, yr)
M = T(xr, yr) · R(−θ) · T(−xr, −yr)
| 1 0 xr | | cosθ sinθ 0 | | 1 0 −xr |
= | 0 1 yr | · | −sinθ cosθ 0 | · | 0 1 −yr |
| 0 0 1 | | 0 0 1 | | 0 0 1 |
Multiplying the last two matrices first:
| cosθ sinθ −xr·cosθ − yr·sinθ |
| −sinθ cosθ xr·sinθ − yr·cosθ |
| 0 0 1 |
Then adding the translation by (xr, yr):
| cosθ sinθ xr(1 − cosθ) − yr·sinθ |
M = | −sinθ cosθ yr(1 − cosθ) + xr·sinθ |
| 0 0 1 |
So a point P(x, y) goes to x' = xr + (x − xr)cosθ + (y − yr)sinθ y' = yr − (x − xr)sinθ + (y − yr)cosθ
Check: for (x, y) = (xr, yr): x' = xr, y' = yr, so the pivot does not move. For counter-clockwise rotation, replace θ by −θ (the sign of the sinθ terms changes).
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Composite rotation and shear in 2D · Computer Graphics, chapter 3
- Scaling about arbitrary fixed point · Computer Graphics, chapter 3
- 3D rotation matrices (clockwise) · Computer Graphics, chapter 4
- 3D scaling about arbitrary point · Computer Graphics, chapter 4
- 3D rotation about arbitrary axis · Computer Graphics, chapter 4 · asked 2×
- 3D rotation about axis (1,2,3)-(10,20,30) · Computer Graphics, chapter 4
- Bar stiffness matrix and 2D truss element · Computational Techniques in Civil Engineering, chapter 4
- Composite curve by deflection angle method · Surveying II, chapter 6 · asked 5×
- Derive beam element stiffness matrix · Finite Element Method, chapter 3
- 4-point DFT by linear transformation · Signals and Systems, chapter 3