Homogeneous 4x4 matrices
Add a 4th coordinate:
Now you can include translation in the matrix.Translation matrix¶
Rotation in 4×4 form (example: Z)¶
Rotate around arbitrary point (clean version)¶
Instead of manual translate/rotate/translate, combine matrices: