5,337
edits
Line 4: | Line 4: | ||
[http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/ http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/] | [http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/ http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/] | ||
Points and vectors are represented using homogeneous coordinates in computer graphics. | Points and vectors are represented using homogeneous coordinates in computer graphics. | ||
Points are <math>(x,y,z,1)</math> and vectors are <math>(x,y,z,0)</math>. | This allows affine transformations in 3D (i.e. rotation and translation) to be represented as a matrix multiplication. | ||
The last coordinate in points allow for translations to be represented as matrix multiplications. | While rotations can typically be represented in a 3x3 matrix multiplication, a translation requires a 'shear' in 4D. | ||
Points are <math>(x,y,z,1)</math> and vectors are <math>(x,y,z,0)</math>. | |||
The last coordinate in points allow for translations to be represented as matrix multiplications. | |||
;Notes | ;Notes | ||
* The point <math>(kx, ky, kz, k)</math> is equivalent to <math>(x, y, z, 1)</math>. | * The point <math>(kx, ky, kz, k)</math> is equivalent to <math>(x, y, z, 1)</math>. | ||
Affine transformations consist of translations, rotations, and scaling | |||
===Translation Matrix=== | ===Translation Matrix=== |