Your SlideShare is downloading. ×
transformation 3d
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

transformation 3d

7,367
views

Published on

Computer Graphics topic:: Transformation in 3d

Computer Graphics topic:: Transformation in 3d

Published in: Education

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
7,367
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
342
Comments
0
Likes
3
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. 3D Geometric Transformation 고려대학교 컴퓨터 그래픽스 연구실
  • 2. Contents
    • Translation
    • Scaling
    • Rotation
    • Rotations with Quaternions
    • Other Transformations
    • Coordinate Transformations
  • 3. Transformation in 3D
    • Transformation Matrix
    3  3 : Scaling, Reflection, Shearing, Rotation 3  1 : Translation 1  3 : Homogeneous representation 1  1 : Uniform global Scaling
  • 4. 3D Translation
    • Translation of a Point
    x z y
  • 5. 3D Scaling
    • Uniform Scaling
    x z y
  • 6. Relative Scaling
    • Scaling with a Selected Fixed Position
    x x x x z z z z y y y y Original position Translate Scaling Inverse Translate
  • 7. 3D Rotation
    • Coordinate-Axes Rotations
      • X-axis rotation
      • Y-axis rotation
      • Z-axis rotation
    • General 3D Rotations
      • Rotation about an axis that is parallel to one of the coordinate axes
      • Rotation about an arbitrary axis
  • 8. Coordinate-Axes Rotations
    • Z-Axis Rotation
    • X-Axis Rotation
    • Y-Axis Rotation
    z y x z y x z y x
  • 9. Order of Rotations
    • Order of Rotation Affects Final Position
      • X-axis  Z-axis
      • Z-axis  X-axis
  • 10. General 3D Rotations
    • Rotation about an Axis that is Parallel to One of the Coordinate Axes
      • Translate the object so that the rotation axis coincides with the parallel coordinate axis
      • Perform the specified rotation about that axis
      • Translate the object so that the rotation axis is moved back to its original position
  • 11. General 3D Rotations
    • Rotation about an Arbitrary Axis
    • Basic Idea
    • Translate (x1, y1, z1) to the origin
    • Rotate (x’2, y’2, z’2) on to the z axis
    • Rotate the object around the z-axis
    • Rotate the axis to the original orientation
    • Translate the rotation axis to the original position
    (x 2 ,y 2 ,z 2 ) (x 1 ,y 1 ,z 1 ) x z y R -1 T -1 R T
  • 12. General 3D Rotations
    • Step 1. Translation
    (x 2 ,y 2 ,z 2 ) (x 1 ,y 1 ,z 1 ) x z y
  • 13. General 3D Rotations
    • Step 2. Establish [ T R ]  x x axis
    (a,b,c) (0,b,c) Projected Point   Rotated Point x y z
  • 14. Arbitrary Axis Rotation
    • Step 3. Rotate about y axis by 
    (a,b,c) (a,0,d)  l d x y Projected Point z Rotated Point
  • 15. Arbitrary Axis Rotation
    • Step 4. Rotate about z axis by the desired angle 
     l y x z
  • 16. Arbitrary Axis Rotation
    • Step 5. Apply the reverse transformation to place the axis back in its initial position
    x y l l z
  • 17. Example Find the new coordinates of a unit cube 90º-rotated about an axis defined by its endpoints A(2,1,0) and B(3,3,1). A Unit Cube
  • 18. Example
    • Step1. Translate point A to the origin
    A’(0,0,0) x z y B’(1,2,1)
  • 19. Example
    • Step 2. Rotate axis A’B’ about the x axis by and angle  , until it lies on the xz plane.
    x z y l B’(1,2,1)  Projected point (0,2,1) B”(1,0,  5)
  • 20. Example
    • Step 3. Rotate axis A’B’’ about the y axis by and angle  , until it coincides with the z axis.
    x z y l  B”(1,0,  5) (0,0,  6)
  • 21. Example
    • Step 4. Rotate the cube 90° about the z axis
      • Finally, the concatenated rotation matrix about the arbitrary axis AB becomes,
  • 22. Example
  • 23. Example
    • Multiplying R ( θ ) by the point matrix of the original cube
  • 24. Rotations with Quaternions
    • Quaternion
      • Scalar part s + vector part v = ( a , b , c )
      • Real part + complex part (imaginary numbers i , j , k )
    • Rotation about any axis
      • Set up a unit quaternion ( u : unit vector)
      • Represent any point position P in quaternion notation ( p = ( x , y , z ))
  • 25. Rotations with Quaternions
      • Carry out with the quaternion operation ( q -1 =( s , – v ) )
      • Produce the new quaternion
      • Obtain the rotation matrix by quaternion multiplication
      • Include the translations:
  • 26. Example
    • Rotation about z axis
      • Set the unit quaternion:
      • Substitute a = b =0 , c =sin( θ /2) into the matrix:
  • 27. Other Transformations
    • Reflection Relative to the xy Plane
    • Z-axis Shear
    x z y x z y
  • 28. Coordinate Transformations
    • Multiple Coordinate System
      • Local (modeling) coordinate system
      • World coordinate scene
    Local Coordinate System
  • 29. Coordinate Transformations
    • Multiple Coordinate System
      • Local (modeling) coordinate system
      • World coordinate scene
    Word Coordinate System
  • 30. Coordinate Transformations
    • Example – Simulation of Tractor movement
      • As tractor moves, tractor coordinate system and front-wheel coordinate system move in world coordinate system
      • Front wheels rotate in wheel coordinate system
  • 31. Coordinate Transformations
    • Transformation of an Object Description from One Coordinate System to Another
    • Transformation Matrix
      • Bring the two coordinates systems into alignment
      • 1. Translation
    u ' y u ' z u ' x x y z (0,0,0) y’ z’ x’ u ' y u ' z u ' x ( x 0 , y 0 , z 0 ) x y z (0,0,0)
  • 32. Coordinate Transformations
      • 2. Rotation & Scaling
    y’ z’ x’ u ' y u ' z u ' x u ' y u ' z u ' x u ' y u ' z u ' x x y z (0,0,0) x y z (0,0,0) x y z (0,0,0)