For a given point:

( | x y z |
) |

or a whole object with multiple points:

( | x_{1}y _{1}z _{1} |
x_{2}y _{2}z _{2} |
x_{3}y _{3}z _{3} |
... ... ... |
) |

These can be multiplied with one of these matrices to rotate it:

( | 1 0 0 | 0 Cos (a) -Sin (a) |
0 Sin (a) Cos (a) |
) |

( | Cos (a) 0 -Sin (a) |
0 1 0 |
Sin (a) 0 Cos (a) |
) |

( | Cos (a) -Sin (a) 0 |
Sin (a) Cos (a) 0 |
0 0 1 |
) |

Note that if you swap the signs on both sines, then the direction of rotation inverts.

If you just want to rotate a two-dimentional figure, use:

( | Cos (a) -Sin (a) |
Sin (a) Cos (a) |
) |

Have you found an error or do you want to add more
information to these pages? You can contact me at the bottom of the home page. |