3D Geometry and Transformations 11 고려대학교 컴퓨터학과 김 창 헌
Contents Translation Scaling Rotation Other transformations Transformation of coordinate systems
Transformation in 3D 33 : Scaling, Reflection, Shearing, Rotation 31 : Translation 11 : Uniform global Scaling 13 : Homogeneous representation
3D Translation Translation of a Point y x z
3D Scaling Uniform scaling y x z
Relative Scaling Scaling with a selected fixed position x z y Original position Translate Scaling Inverse Translate
3D Rotation 1. Coordinate-Axes Rotations 좌표축을 기준으로 회전 2. General Three-Dimensional Rotations 좌표축에 평행한 회전축 기준 회전 임의의 회전축(직선) 기준 회전
Coordinate-Axis Rotations y X축 중심 회전 Z 축 중심 회전 x z x축 중심 회전 y z y x z축 중심 회전 Y축 중심 회전 x z y축 중심 회전
Order of rotations affects the final position of an object
Rotation about an Principal axis 좌표축과 평행한 회전축 중심 회전 물체를 좌표축과 평행하게 이동 (회전축이동) 회전 물체를 원위치로 이동 (회전축 원위치)
Rotation about an arbitrary axis Basic Idea 1. 원점을 지나도록 회전축을 평행이동 2. 좌표축과 일치하도록 회전축을 회전 3. 축에 대한 회전 4. 회전축을 원래 방향으로 역회전 5. 회전축을 원위치로 평행 이동 y T (x2,y2,z2) R (x1,y1,z1) R-1 x T-1 z
Rotation about an arbitrary axis Step 1. Translation (x2,y2,z2) (x1,y1,z1) x z y
Rotation about an arbitrary axis Step 2. Establish [ TR ]x x axis y (0,b,c) (a,b,c) Projected Point x z Rotated Point
Rotation about an arbitrary axis Step 3. Rotate about y axis by y (a,b,c) l Projected Point d x (a,0,d) Rotated Point z
Rotation about an arbitrary axis Step 4. Rotate about z axis by the desired angle y l x z
Rotation about an arbitrary axis Step 5. Apply the reverse translation to place the axis back in its initial position x z y l
Rotation about an arbitrary axis Ex) Find the new coordinates of a unit cube rotated about an axis defined by its endpoints A(2,1,0) and B(3,3,1). Step1. Translate point A to the origin y B’(1,2,1) A’(0,0,0) x A Unit Cube z
Rotation about an arbitrary axis Step 2. Rotate axis A’B’ about the x axis by and angle , until it lies on the xz plane. y Projected point (0,2,1) B’(1,2,1) l x z B”(1,0,5)
Rotation about an arbitrary axis Step 3. Rotate axis A’B’’ about the y axis by and angle , until it coincides with the z axis. y l x (0,0,6) B”(1,0, 6) z
Rotation about an arbitrary axis Step 4. Rotate the cube 90° about the z axis Finally, the concatenated rotation matrix about the arbitrary axis AB becomes,
Rotation about an arbitrary axis
Rotation about an arbitrary axis Multiplying [TR]AB by the point matrix of the original cube
3D Reflections & Shears Reflection relative to the xy plane z-axis shear y y z z x x
Transformation of Coordinate System Front-Wheel Tractor System World Coordinate Coordinate Coordinate
Transformation of Coordinate System Use of Multiple Coordinate System zworld