Advanced Computer Graphics (2IV40) ~ 3D Transformations Kees Huiing Huub van de Wetering Winter 2005/6 Tpes (geometric) maintain distances & orientation (LH/RH): rigid bod transforms (rotations, translations) maintain distances: congruences (+ reflections) maintain straight lines & parallelism: affine transformations (+ shears, scalings) maintain straight lines: projective transformations...: e.g., morphing 1 3 3D Transformations Mainl interested in bijections (3D!3D) for: navigation, object movement hierarchical modelling coordinate transformations Three views: Geometr Algebra Information Tpes (algebraic) linear transformations: ( ) plus translations: 1 2-1 2 3 4-1 -2-3 = a 1 + b 1 + c 1 + d 1 = a 2 + b 2 + c 2 + d 2 = a 3 + b 3 + c 3 + d 3 2 4
Tpes (information) Homogeneous coordinates: ( )( ) a 1 b 1 c 1 d 1 a 2 b 2 c 2 d 2 a 3 b 2 c 2 d 3 0 0 0 1 1 3D schaling (scaling) Schaal met factoren s, s,s : = s, = s, = s ofwel projective transform all affine transforms b matri multiplications intersecting alwas ields a solution H&B 5-:275-278 5 7 3D Translatie (translation) In 4D homogene coördinaten: T P P+T 3D reflection (spiegeling) Reflection in line l (reflection ais) : = 180 rotation about l Reflection in plane: converts right-handed coordinate ss into left-handed Eample: reflection in -plane: H&B 5-10:262-263 H&B 5-14:281 6 8
3D shearing (afschuiving) See also 2D Eample: shear parallel to -plane : Rigid bod transforms!! Preserve: angles distances orientation two classes onl: translations rotations H&B 5-14:282 9 11 3D Rotatie om willekeurige as 3 Rigid bod transforms!! Preserve: Initieel 1. transleer as 2. roteer as angles distances orientation two classes onl: 3. roteer om as 4. roteer as terug 5. transleer as terug translations rotations 10 11
How to specif rotations? How to specif rotations? one etra needed for rotation about own ais How to specif rotations? How to specif rotations? one etra needed for rotation about own ais ==> three DOFs
How to specif rotations? Euler 2: gimbal lock Order is fied, e.g., H(ead) P(itch) R(oll) one etra needed for rotation about own ais ==> three DOFs Euler angles Eample: after H 0 o, P 90 o we can t rotate about world -ais anmore. Originall: problem with groscopes in airplanes Also: problem when specifing rotations in animations etc. 14 Euler angles intuitive wa to orient an object (or ourself) Yaw/Head Pitch - Roll Fied order, e.g., head-pitch-roll 13 15
About two hours after the Apollo 11 landing, Command Module Pilot Mike Collins had the following conversation with CapCom Owen Garriott. 104:59:35 Garriott: Columbia, Houston. We noticed ou are maneuvering ver close to gimbal lock. I suggest ou move back awa. Over. 104:59:43 Collins: Yeah. I am going around it, doing a CMC Auto maneuver to the Pad values of roll 270, pitch 101, aw 45. 104:59:52 Garriott: Roger, Columbia. (Long Pause) 105:00:30 Collins: (Faint, joking) How about sending me a fourth gimbal for Christmas. [Armstrong - "This is Mike at his best. We had a four-gimbal platform on Gemini."] Gimbal lock algebraicall Show how gimbal lock can remove a DOF b computing the Euler matri for Head h, Pitch 90º, Roll r 15 16 About two hours after the Apollo 11 landing, Command Module Pilot Mike Collins had the following conversation with CapCom Owen Garriott. 104:59:35 Garriott: Columbia, Houston. We noticed ou are maneuvering ver close to gimbal lock. I suggest ou move back awa. Over. 104:59:43 Collins: Yeah. I am going around it, doing a CMC Auto maneuver to the Pad values of roll 270, pitch 101, aw 45. 104:59:52 Garriott: Roger, Columbia. (Long Pause) 105:00:30 Collins: (Faint, joking) How about sending me a fourth gimbal for Christmas. [Armstrong - "This is Mike at his best. We had a four-gimbal platform on Gemini."] Alternative to Euler angles Better specification model: Quaternions First: more about rotations ==> Switch to handout Motion control kinematic, ch. 13 from Alan Watt and Fabio Policarpo. 3D Games Volume 1. Note: the word gimbal comes from gemini! 15 17