2D Transformations. Why Transformations. Translation 4/17/2009

Similar documents
5. Geometric Transformations and Projections

Prof. Feng Liu. Fall /17/2016

Computer Graphics and Animation 3-Viewing

Coordinate Systems. Ioannis Rekleitis

CS-184: Computer Graphics. Today. Lecture #5: 3D Transformations and Rotations. Transformations in 3D Rotations

4.2. Co-terminal and Related Angles. Investigate

Transformations II. Arbitrary 3D Rotation. What is its inverse? What is its transpose? Can we constructively elucidate this relationship?

A Mathematical Implementation of a Global Human Walking Model with Real-Time Kinematic Personification by Boulic, Thalmann and Thalmann.

17/5/2009. Introduction

Shape Matching / Object Recognition

CSE 165: 3D User Interaction

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

Environment Mapping. Overview

Introduction to Medical Imaging. Cone-Beam CT. Introduction. Available cone-beam reconstruction methods: Our discussion:

CS 548: COMPUTER GRAPHICS QUATERNIONS SPRING 2015 DR. MICHAEL J. REALE

(a, b) x y r. For this problem, is a point in the - coordinate plane and is a positive number.

CS 450: COMPUTER GRAPHICS QUATERNIONS SPRING 2016 DR. MICHAEL J. REALE

Goal. Rendering Complex Scenes on Mobile Terminals or on the web. Rendering on Mobile Terminals. Rendering on Mobile Terminals. Walking through images

All lengths in meters. E = = 7800 kg/m 3

Introduction To Robotics (Kinematics, Dynamics, and Design)

Physical simulation for animation

Modeling Transformations Revisited

Transformations II. Week 2, Wed Jan 17

Augmented Reality. Integrating Computer Graphics with Computer Vision Mihran Tuceryan. August 16, 1998 ICPR 98 1

(x, y) (ρ, θ) ρ θ. Polar Coordinates. Cartesian Coordinates

Positioning of a robot based on binocular vision for hand / foot fusion Long Han

Massachusetts Institute of Technology Department of Mechanical Engineering

2. PROPELLER GEOMETRY

a Not yet implemented in current version SPARK: Research Kit Pointer Analysis Parameters Soot Pointer analysis. Objectives

Output Primitives. Ellipse Drawing

A Memory Efficient Array Architecture for Real-Time Motion Estimation

ISyE 4256 Industrial Robotic Applications

EYE DIRECTION BY STEREO IMAGE PROCESSING USING CORNEAL REFLECTION ON AN IRIS

The Processor: Improving Performance Data Hazards

Computer Graphics. Geometric Transformations

UCB CS61C : Machine Structures

Cache Memory and Performance

Computer Graphics. Geometric Transformations

Where am I? Using Vanishing Points

COSC 6385 Computer Architecture. - Pipelining

Query Language #1/3: Relational Algebra Pure, Procedural, and Set-oriented

CS 450: COMPUTER GRAPHICS RASTERIZING CONICS SPRING 2016 DR. MICHAEL J. REALE

Derivation of the Nodal Forces Equivalent to Uniform Pressure for Quadratic Isoparametric Elements RAWB, Last Update: 30 September 2008

Tufts University Math 13 Department of Mathematics November 14, :00 noon to 1:20 pm

Finding point-pairs. Find Closest Point from Dense Cloud

CS559: Computer Graphics

3D Shape Reconstruction (from Photos)

Stereo and 3D Reconstruction

University of Waterloo CS240 Winter 2018 Assignment 4 Due Date: Wednesday, Mar. 14th, at 5pm

How many times is the loop executed? middle = (left+right)/2; if (value == arr[middle]) return true;

Color Correction Using 3D Multiview Geometry

What and Why Transformations?

4. Two Dimensional Transformations

1. We ll look at: Types of geometrical transformation. Vector and matrix representations

Journal of World s Electrical Engineering and Technology J. World. Elect. Eng. Tech. 1(1): 12-16, 2012

Extended Perspective Shadow Maps (XPSM) Vladislav Gusev, ,

Lecture overview. Visualisatie BMT. Visualization pipeline. Data representation. Discrete data. Sampling. Data Datasets Interpolation

Image Enhancement in the Spatial Domain. Spatial Domain

Lecture 27: Voronoi Diagrams

Topic -3 Image Enhancement

CS770/870 Spring 2017 Transformations

Introduction to Computer Graphics with WebGL

Reader & ReaderT Monad (11A) Young Won Lim 8/20/18

Collision Detection with Swept Spheres and Ellipsoids

A Novel Image-Based Rendering System With A Longitudinally Aligned Camera Array

Motion Estimation. Yao Wang Tandon School of Engineering, New York University

Modeling Transformations

Computer Science 141 Computing Hardware

A modal estimation based multitype sensor placement method

Improved Fourier-transform profilometry

Where am I? Using Vanishing Points

Segmentation of Casting Defects in X-Ray Images Based on Fractal Dimension

Adaptation of Motion Capture Data of Human Arms to a Humanoid Robot Using Optimization

POMDP: Introduction to Partially Observable Markov Decision Processes Hossein Kamalzadeh, Michael Hahsler

A New and Efficient 2D Collision Detection Method Based on Contact Theory Xiaolong CHENG, Jun XIAO a, Ying WANG, Qinghai MIAO, Jian XUE

COEN-4730 Computer Architecture Lecture 2 Review of Instruction Sets and Pipelines

6. Modelview Transformations

CALCULUS III Surface Integrals. Paul Dawkins

9/5/2018. Physics colloquium today -- 9/05/2018 PHY 711 Fall Lecture /05/2018 PHY 711 Fall Lecture 4 3

A NEW GROUND-BASED STEREO PANORAMIC SCANNING SYSTEM

Modeling Transformations

Layered Animation using Displacement Maps

Multiview plus depth video coding with temporal prediction view synthesis

MEM380 Applied Autonomous Robots Winter Robot Kinematics

CS 4204 Computer Graphics

CSE328 Fundamentals of Computer Graphics: Theory, Algorithms, and Applications

This lecture. Abstract Data Types (ADTs) The Stack ADT ( 4.2) Stacks. Stack Interface in Java. Exceptions. Abstract data types Stacks Queues

Modeling Transformations

A Neural Network Model for Storing and Retrieving 2D Images of Rotated 3D Object Using Principal Components

9.4. Perform Rotations. Draw a rotation. STEP 1 Draw a segment from A to P. STEP 2 Draw a ray to form a 1208 angle with } PA.

Detection and Recognition of Alert Traffic Signs

A Novel Automatic White Balance Method For Digital Still Cameras

Lecture 8 Introduction to Pipelines Adapated from slides by David Patterson

AN ARTIFICIAL NEURAL NETWORK -BASED ROTATION CORRECTION METHOD FOR 3D-MEASUREMENT USING A SINGLE PERSPECTIVE VIEW

Fifth Wheel Modelling and Testing

CS Computer Graphics: Transformations & The Synthetic Camera

Any modern computer system will incorporate (at least) two levels of storage:

Image Acquisition and Camera Model

What is a Radian? The side that remains fixed is called the initial side

Journal of Machine Engineering, Vol. 15, No. 4, 2015

Transcription:

4/7/9 D Tansfomations Wh Tansfomations Coodinate sstem tansfomations Placing objects in the wold Move/animate the camea fo navigation Dawing hieachical chaactes Animation Tanslation + d 5,4 + d,3 d 4, 6, T P P d, 3, P P + T tanslation (3,) 3

4/7/9 Rotation P(,) P (, ) 4 ) ( ) ( + + ) ( ) ( + ϕ + + Rotation, 3,,3 5, + R P RP P Scale s s 4,6 ss 6, 3,,3 P P s s S P SP 6,,

4/7/9 Efficienc Poblem... Tanslation is pefomed with an addition, while scale and otation ae pefomed with multiplication. We d like to teat them all the same to avoid eta bookkeeping! optimize the hadwae compose tansfomations P T + P P SP P RP 7 Homogenous Coodinates Teat tanslation as a multiplication Requies an eta coodinate / w Homogenous Point, w / w Catesian Point, Use w and the homogenous point catesian point Use w to epesent a homogenous diection vecto 8 Homogenous Coodinates Mathematical model: Pojective planes Eve line pasg though the oigin is a point in the pojective plane Can be seen as points in the set w plus lines puel inside w Anothe epesentation is to identif antipodal points inside N-dimensional sphee Non-oientable ecept when N Mobius band + disk Possible issue: *futue is in the past* 9 3

4/7/9 Homogenous Coodinates d c s T d R s c s S s I Which one does NOT affect a vecto? Composition Seies of tansfomations can be composited into a gle tansfomation mati Fo eample, how do we otate aound a point othe than the oigin? a,b How do we otate about this point? Composition Appl a seies of tansfomations tanslate to the oigin otate tanslate back a,b a,b 4

4/7/9 Composition a,b a,b tanslate(-a,-b) otate(9) tanslate(a,b) T a b R T a b T RT P P 3 Composition Eample tanslate b in scale b in, (unifom scaling) T S,3,3,3,3 -,, 3,, 3, 4 Composition Eample # Tanslate, Scale (,) (-,) (-,) (3,) (,) (,) (,3) tanslate (,3) scale (,6) # Scale, Tanslate (,) (,) (,) (3,) (6,) (4,) (,3) scale (4,6) tanslate (,6) 5 5

4/7/9 6 Composition Eample P STP 4 osuscale(.,.); osutanslate(-.,.); dawtiangle(); 6 P TSP osutanslate(-.,.); osuscale(.,.); dawtiangle(); Mati multiplication is not commutative!!! So the ode of appling the tansfomations is impotant. Composition Thee ae two was to think about tansfomations In a gand, fied coodinate sstem In a moving coodinate sstem D di h i li 7 Depending on how ou visualize ou tansfomations, ou must pefom ou multiplications in a specific ode ight to left w..t. gand fied sstem left to ight w..t. moving coodinate sstem Composition 8 a a

4/7/9 Gand Fied Coodinate Sstem Rotate Tanslate a a Absolute tansfomation. Eecute the tansfoms Right to Left w..t. efeence fame P TRP 9 Moving Coodinate Sstem Tanslate Rotate a Relative tansfomation. Left to ight w..t. the new moving coodinate sstem P TRP Absolute vs. Relative Results ae the same Useful to think in tems of elative when building a hieachical chaacte Think in tems of the sstem that makes the most sense appl tansfoms in the coect ode also applies to gaphics liba outines 7

4/7/9 OpenGL/osuGL P TRP Eithe wa I think about the tansfomation, this is m esult! osutanslate(); osurotate(); dawpoint(); In ou gaphics liba, list the tansfoms in the ode that the appea when eading the tansfomation equation! 3D Tansfomations 3 3D Coodinate Sstem +z + Homogenous 3D point + z w z Catesian 3D point Homogenous 3D point when w 4 8

4/7/9 Tanslation and Scale Tanslation t t tz Scale s s sz 5 3D Rotation Now, have 3 aes we can otate about Rotate Notice, does not change Looking down negative otating counte clockwise 6 3D Rotations Rotate RotateZ Invese of 3D otation is it s tanspose! 7 9

4/7/9 3D Rotations Quatenion W+i+j+Zk i*ij*jk*k- i*jk, j*ki, k*ij j*i-k, k*j-i, i*k-j 8 3D Rotations Unit quatenion coesponds to 3D otations: W*W+*+*+Z*Z W(t/), (,,Z)(t/)(,,z) (,, z) is a unit vecto along the ais of otation t is the angle of otation 9 3D Rotations To otate a vecto vai+bj+ck aound the ais (,, z) b an angle of t q (t/) + (t/)(i+j+zk) p (t/) - (t/)(i+j+zk) v q*v*p 3

4/7/9 Wh use tansfomations? Placement of objects Re-ug o instancing objects Hieachical tansfomations Changes in coodinate sstems 3 Mati Stacks Immediate mode gaphics commands ae eecuted as encounteed Retained mode gaphics commands ae stoed in a data stuctue and eecuted at some time in the pipeline 3 Mati Stack Teminolog Teminolog CTM : cuent tansfomation mati osupushmati : duplicate the CTM and put on top of the stack emembe whee ou ae osupopmati: pop the top tansfomation off of the stack osutanslate osurotate osuscale The CTM affects an vete (osuvetef) 33

4/7/9 Hieachical Chaacte Model Chaactes ae tee like Have a oot and limbs Good place to use the mati stack to facilitate the modeling 34 Hieachical Robot push s pop toso t am Robot t,s am t hand hand,s,t,s,t thumb finge thumb finge 35 void squae(){ begin(polgon); vete(-,-); vete(-,); vete(,); vete(,-); end(); } Hieachical Chaacte 36

4/7/9 Mati Stacks Often useful to be able to save and ecall the cuent tansfomation Hieachical models Instancing 37 Cuent Tansfomation Mati (CTM) Conceptuall thee is a 4 4 homogeneous coodinate mati, the cuent tansfomation mati (CTM) that is pat of the state and is applied to all vetices that pass down the pipeline The CTM is defined in the use pogam and loaded into a tansfomation unit vetices p C CTM p Cp vetices 38 CTM opeations The CTM can be alteed eithe b loading a new CTM o b postmutiplication Load an identit mati: C I Load an abita mati: C M Load a tanslation mati: C T Load a otation mati: C R Load a scaling mati: C S Postmultipl b an abita mati: C CM Postmultipl b a tanslation mati: C CT Postmultipl b a otation mati: C CR Postmultipl b a scaling mati: C CS 39 3

4/7/9 CTM Opeations Push Mati Makes a cop and stoes it on the top of the stack Pop Mati Pops the top of the mati stack Mati Stack is init. to CTM I 4 4