Computer Graphics: Difference between revisions

Line 6: Line 6:
Points and vectors are represented using homogeneous coordinates in computer graphics.   
Points and vectors are represented using homogeneous coordinates in computer graphics.   
This allows affine transformations in 3D (i.e. rotation and translation) to be represented as a matrix multiplication.   
This allows affine transformations in 3D (i.e. rotation and translation) to be represented as a matrix multiplication.   
While rotations can typically be represented in a 3x3 matrix multiplication, a translation requires a [[wikipedia:Shear mapping ''shear'']] in 4D.
While rotations can typically be represented in a 3x3 matrix multiplication, a translation requires a [[wikipedia:Shear mapping | ''shear'']] in 4D.


Points are <math>(x,y,z,1)</math> and vectors are <math>(x,y,z,0)</math>.   
Points are <math>(x,y,z,1)</math> and vectors are <math>(x,y,z,0)</math>.