Successfully reported this slideshow.
Upcoming SlideShare
×

# 3 d transformations

771 views

Published on

computer graphics

Published in: Engineering
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

### 3 d transformations

1. 1. Computer Graphics 3D Transformations Total Slides 17
2. 2. From 2D to 3D • Translation is simple as in 2D • Use of Homogeneous coordinate in 3D – In 3D transformation always use Matrices: 4x4 • All transformation in 3D is simple but only Rotation transformation is complex in 3D transformation.
3. 3. 3D Translation Translate using (tx, ty,tz): x’=x+ tx, y’=y+ ty , z’=z+ tz or x y P P+T T z           =           =           = += z y x t t t z y x z y x TPP TPP' en, ' ' ' ' met,
4. 4. 3D Translation 2 In 4D homogeneous coordinates: x y P P+T T z 11000 100 010 001 1 ' ' ' or,                             =               = z y x t t t z y x z y x MPP'
5. 5. 3D Rotation 1 z P x y P’ α 1000 0100 00cossin 00sincos )( with,)( Or ' cossin' sincos' :as-aroundangleoverRotate               − = = = += −= αα αα α α αα αα α z z zz yxy yxx z R PRP'
6. 6. 2D Rotation about the origin. y x r r P’(x’,y’) P(x,y) θ φ y φ φ sin. cos. ry rx = = x θφθφφθ θφθφφθ cos.sin.sin.cos.)sin(. sin.sin.cos.cos.)cos(. rrry rrrx +=+=′ −=+=′
7. 7. 3D Rotation 2 z x y Rotation around axis: - Counterclockwise, viewed from rotation axis z x y z x y
8. 8. 3D Rotation 3 z x y z x y z x y zy yx xz → → → xz zy yx → → → Rotation around axes: Cyclic permutation coordinate axes xzyx →→→
9. 9. 3D Rotation zy yx xz → → → 1000 0100 00cossin 00sincos )( with,)( Or ' cossin' sincos' :as-aroundangleoverRotate               − = = = += −= αα αα α α αα αα α z z zz yxy yxx z R PRP' 1000 0cossin0 0sincos0 0001 )( with,)( Or ' cossin' sincos' :as-aroundangleoverRotate               − = = = += −= αα αα α α αα αα α x x xx zyz zyy x R PRP'
10. 10. 11000 000 000 000 1 ' ' ' or,                             =               = z y x s s s z y x z y x SPP' 3D scaling Scale with factors sx, sy,sz: x’= sx x, y’= sy y, z’= sz z or
11. 11. 3D scaling
12. 12. 3D shearing
13. 13. 3D rotation Example
14. 14. 3D rotation Example
15. 15. Combine 3D Transformation
16. 16. 3D Combine Transformations
17. 17. Thank You!!