Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Transformation matrix
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Examples in 3D computer graphics== ===Rotation=== The [[rotation matrix#General 3D rotations|matrix to rotate]] an angle ''ΞΈ'' about any axis defined by [[unit vector]] (''x'',''y'',''z'') is<ref>{{cite book |page = 154 |title = Basic Mathematics for Electronic Engineers:Models and Applications |first = John E. |last = Szymanski |publisher = Taylor & Francis |year = 1989 |isbn = 0278000681 }}</ref> <math display="block">\begin{bmatrix} xx(1-\cos \theta)+\cos\theta & yx(1-\cos\theta)-z\sin\theta & zx(1-\cos\theta)+y\sin\theta\\ xy(1-\cos\theta)+z\sin\theta & yy(1-\cos\theta)+\cos\theta & zy(1-\cos\theta)-x\sin\theta \\ xz(1-\cos\theta)-y\sin\theta & yz(1-\cos\theta)+x\sin\theta & zz(1-\cos\theta)+\cos\theta \end{bmatrix}.</math> ===Reflection=== {{main|Householder transformation}} To reflect a point through a plane <math>ax + by + cz = 0</math> (which goes through the origin), one can use <math>\mathbf{A} = \mathbf{I} - 2\mathbf{NN}^\mathrm{T} </math>, where <math>\mathbf{I}</math> is the 3Γ3 identity matrix and <math>\mathbf{N}</math> is the three-dimensional [[unit vector]] for the vector normal of the plane. If the [[L2 norm|''L''<sup>2</sup> norm]] of <math>a</math>, <math>b</math>, and <math>c</math> is unity, the transformation matrix can be expressed as: <math display="block">\mathbf{A} = \begin{bmatrix} 1 - 2 a^2 & - 2 a b & - 2 a c \\ - 2 a b & 1 - 2 b^2 & - 2 b c \\ - 2 a c & - 2 b c & 1 - 2c^2 \end{bmatrix}</math> Note that these are particular cases of a [[Householder reflection]] in two and three dimensions. A reflection about a line or plane that does not go through the origin is not a linear transformation β it is an [[affine transformation]] β as a 4Γ4 affine transformation matrix, it can be expressed as follows (assuming the normal is a unit vector): <math display="block">\begin{bmatrix} x' \\ y' \\ z' \\ 1 \end{bmatrix} = \begin{bmatrix} 1 - 2 a^2 & - 2 a b & - 2 a c & - 2 a d \\ - 2 a b & 1 - 2 b^2 & - 2 b c & - 2 b d \\ - 2 a c & - 2 b c & 1 - 2c^2 & - 2 c d \\ 0 & 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \\ 1 \end{bmatrix} </math> where <math>d = -\mathbf{p} \cdot \mathbf{N}</math> for some point <math>\mathbf{p}</math> on the plane, or equivalently, <math>ax + by + cz + d = 0</math>. If the 4th component of the vector is 0 instead of 1, then only the vector's direction is reflected and its magnitude remains unchanged, as if it were mirrored through a parallel plane that passes through the origin. This is a useful property as it allows the transformation of both positional vectors and normal vectors with the same matrix. See [[homogeneous coordinates]] and [[#Other kinds of transformations|affine transformations]] below for further explanation.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)