Professional Documents
Culture Documents
3D Geometric Transformation: - Point in 3D Space
3D Geometric Transformation: - Point in 3D Space
3D Geometric Transformation: - Point in 3D Space
Point in 3D space
Position (x, y, z) Color (r, g, b) Normal (Nx, Ny, Nz)
N
(x,y,z)
Homogenous Coordinates
Position (x,y,z,w) Usually (x,y,z,1)
Transformations
Translation Scaling Rotation Projection
3D Translation
T(dx,dy,dz)= 1 0 0 0 0 1 0 0 0 0 1 0 dx dy dz 1
(x,y,z)
To translate the point (x,y,z) by the offset (dx, dy, dx) T(dx,dy,dz) . (x,y,z,1)T
(x,y,z)
3D Scaling
(x,y,z)
S(sx,sy,sz)=
sx 0 0 sy 0 0 0 0
0 0 sz 0
0 0 0 1
(x,y,z)
3D Sheering
Sheer along one or more axes Sz(hx,hy)= 1 0 0 0 0 1 0 0 hx hy 1 0 0 0 0 1
(x,y,z)
(x,y,z)
To sheer the point (x,y,z) along the x and y axes H(hx,hy) . (x,y,z,1)T =
(x+hx*z, y+hy*z, z, 1)
3D Rotation
To rotate a point (x,y,z) around the x axis by angle j Rx(j) = 1 0 0 cos(j) 0 sin(j) 0 0 0 -sin(j) cos(j) 0 0 0 0 1
(x,y,z)
x
(x,y,z)
A 90o Rotation
3D Rotation
To rotate a point (x,y,z) around the y axis by angle j Ry(j) = cos(j) 0 -sin(j) 0 0 1 0 0 sin(j) 0 cos(j) 0 0 0 0 1
(x,y,z)
(x,y,z)
3D Rotation
To rotate a point (x,y,z) around the z axis by angle j Rz(j) = cos(j) -sin(j) sin(j) cos(j) 0 0 0 0 0 0 1 0 0 0 0 1
(x,y,z)
Composition of 3D Transformations
General 3D transformation looks as the following
T=
We should split the transformation into its generic composing transformations. Then carry these transformation one by one.
Composition of 3D Transformations