Download presentation
Presentation is loading. Please wait.
Published byAdele Angelina Jordan Modified over 9 years ago
1
3D Geometric Transformation Point in 3D space –Position (x, y, z) –Color (r, g, b) –Normal (Nx, Ny, Nz) Homogenous Coordinates –Position (x,y,z,w) –Usually (x,y,z,1) Transformations –Translation –Scaling –Rotation –Projection (x,y,z) N
2
3D Translation (x,y,z) (x’,y’,z’) T(dx,dy,dz)= 1 0 0 dx 0 1 0 dy 0 0 1 dz 0 0 0 1 To translate the point (x,y,z) by the offset (dx, dy, dx) T(dx,dy,dz). (x,y,z,1) T =(x+dx, y+dy, z+dz,1)
3
3D Scaling (x,y,z) (x’,y’,z’) S(sx,sy,sz)= sx 0 0 0 0 sy 0 0 0 0 sz 0 0 0 0 1 To scale the vector (x,y,z) by the factors sx,sy,and sz S(sx,sy,sz). (x,y,z,1) T =(x*sx, y*sy, z*sz,1)
4
3D Sheering (x,y,z) (x’,y’,z’) S z (hx,hy)= 1 0 hx 0 0 1 hy 0 0 0 1 0 0 0 0 1 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) Sheer along one or more axes
5
3D Rotation (x,y,z) (x’,y’,z’) R x ( ) = 1 0 0 0 0 cos( ) -sin( ) 0 0 sin( ) cos( ) 0 0 0 0 1 A 90 o Rotation of (0,1,0,1) will produce (0,0,1,1) To rotate a point (x,y,z) around the x axis by angle x
6
3D Rotation (x,y,z) (x’,y’,z’) R y ( ) = cos( ) 0 sin( ) 0 0 1 0 0 -sin( ) 0 cos( ) 0 0 0 0 1 A 90 o Rotation of (1,0,0,1) will produce (0,0,1,1) To rotate a point (x,y,z) around the y axis by angle
7
3D Rotation (x,y,z) (x’,y’,z’) R z ( ) = cos( ) -sin( ) 0 0 sin( ) cos( ) 0 0 0 0 1 0 0 0 0 1 A 90 o Rotation of (1,0,0,1) will produce (0,1,01) To rotate a point (x,y,z) around the z axis by angle x
8
Composition of 3D Transformations T = t 00 t 01 t 02 t 03 t 10 t 11 t 12 t 13 t 20 t 21 t 22 t 23 t 30 t 31 t 32 t 33 We should split the transformation into its generic composing transformations. Then carry these transformation one by one. General 3D transformation looks as the following
9
Composition of 3D Transformations
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.