Example
Rotate around a chosen pivot with T(p) R T(-p).
highlighted = computed this step
Step 1 — Move pivot to origin
Translate the pivot to the origin.
T(−p)=100010−2−11
Step 2 — Rotate at origin
Rotate around the origin.
R=010−100001
Step 3 — Move pivot back
Translate the pivot back.
T(p)=100010211
Step 4 — Compose
Compose T(p) R T(-p).
T(p)RT(−p)=010−1003−11
Step 5 — Rotate vertex A
Move vertex A with the matrix.
A′=010−1003−11111=0⋅1+(−1)⋅1+3⋅11⋅1+0⋅1+(−1)⋅10⋅1+0⋅1+1⋅1=201
Step 6 — Rotate vertex B
Move vertex B with the matrix.
B′=010−1003−11311=0⋅3+(−1)⋅1+3⋅11⋅3+0⋅1+(−1)⋅10⋅3+0⋅1+1⋅1=221
Step 7 — Rotate vertex C
Move vertex C with the matrix.
C′=010−1003−11121=0⋅1+(−1)⋅2+3⋅11⋅1+0⋅2+(−1)⋅10⋅1+0⋅2+1⋅1=101
Step 8 — Result
The transformed triangle is complete.
transformed triangle complete
rotate-about-a-point
To rotate about a pivot p, translate p to the origin, rotate, then translate back. The composite is T(p) R T(-p).