Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Similar documents
Geometric Transformations Hearn & Baker Chapter 5. Some slides are taken from Robert Thomsons notes.

Representations and Transformations. Objectives

Note 2: Transformation (modeling and viewing)

Rotation Matrices Three interpretations of rotational matrices Representing the coordinates of a point in two different frames

Computer Graphics. Transformation

Computer Graphics. Geometric Transformations

Computer Graphics. Geometric Transformations

CS 428: Fall Introduction to. Geometric Transformations (continued) Andrew Nealen, Rutgers, /20/2010 1

CS770/870 Spring 2017 Transformations

Homogeneous Coordinates

3D Kinematics. Consists of two parts

Chapter 3 : Computer Animation

CS354 Computer Graphics Rotations and Quaternions

Computer Graphics. P04 Transformations. Aleksandra Pizurica Ghent University

Quaternion Interpolation

CT5510: Computer Graphics. Transformation BOCHANG MOON

CS5620 Intro to Computer Graphics

Quaternions & Rotation in 3D Space

Orientation & Quaternions

CS559: Computer Graphics

Figure 1: 2D arm. Figure 2: 2D arm with labelled angles

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Announcements. Equation of Perspective Projection. Image Formation and Cameras

CS F-07 Objects in 2D 1

1 Historical Notes. Kinematics 5: Quaternions

MAP. Vectors and Transforms. Reading instructions Quick Repetition of Vector Algebra. In 3D Graphics. Repetition of the Rendering Pipeline

CS4670: Computer Vision

Today. Today. Introduction. Matrices. Matrices. Computergrafik. Transformations & matrices Introduction Matrices

Computer Graphics. 2D transformations. Transforma3ons in computer graphics. Overview. Basic classes of geometric transforma3ons

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Image Warping CSE399b, Spring 07 Computer Vision

CS 335 Graphics and Multimedia. Geometric Warping

Determining the 2d transformation that brings one image into alignment (registers it) with another. And

CMSC 425: Lecture 6 Affine Transformations and Rotations

Motion Control (wheeled robots)

Transformations. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

8. Wavelength measurement with a grating spectrometer

Transformations: 2D Transforms

Modeling Transformations

What and Why Transformations?

Realtime 3D Computer Graphics Virtual Reality

Modeling Transformations

4. Two Dimensional Transformations

CS770/870 Spring 2017 Transformations

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

CS770/870 Spring 2017 Quaternions

CS612 - Algorithms in Bioinformatics

Image Warping. Some slides from Steve Seitz

Animation. Keyframe animation. CS4620/5620: Lecture 30. Rigid motion: the simplest deformation. Controlling shape for animation

Visual Recognition: Image Formation

Advanced Encryption Standard and Modes of Operation

IMPLEMENTATION OF AREA, VOLUME AND LINE SOURCES

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

Image warping. image filtering: change range of image. image warping: change domain of image g(x) = f(h(x)) h(y)=0.5y+0.5. h([x,y])=[x,y/2] f h

Computer Graphics. Jeng-Sheng Yeh 葉正聖 Ming Chuan University (modified from Bing-Yu Chen s slides)

Lighting and Shading

CS452/552; EE465/505. Geometry Transformations

Transformations. Examples of transformations: shear. scaling

Classical Mechanics Examples (Lagrange Multipliers)

Geometric Model of Camera

Transformations Week 9, Lecture 18

Announcements. The equation of projection. Image Formation and Cameras

Raster Graphics Algorithms

What does OpenGL do?

CS184: Using Quaternions to Represent Rotation

Log1 Contest Round 2 Theta Geometry. 4 points each 1 What is the area of an isosceles right triangle with legs of length 3?

More on Transformations. COS 426, Spring 2019 Princeton University

Exercises of PIV. incomplete draft, version 0.0. October 2009

CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES

12.1 Quaternions and Rotations

Uses of Transformations. 2D transformations Homogeneous coordinates. Transformations. Transformations. Transformations. Transformations and matrices

MEM380 Applied Autonomous Robots Winter Robot Kinematics

Image Warping, mesh, and triangulation CSE399b, Spring 07 Computer Vision

Quaternions and Rotations

Image Warping : Computational Photography Alexei Efros, CMU, Fall Some slides from Steve Seitz

CS 445 / 645 Introduction to Computer Graphics. Lecture 21 Representing Rotations

Quaternions and Rotations

To Do. Computer Graphics (Fall 2004) Course Outline. Course Outline. Motivation. Motivation

Quaternions and Rotations

Quaternions and Rotations

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

Perspective Projection Transformation

KS3 Maths Assessment Objectives

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

Viewing Transformations I Comp 535

Modeling Transformations Revisited

Chap 7, 2009 Spring Yeong Gil Shin

General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing)

3D Transformations World Window to Viewport Transformation Week 2, Lecture 4

3D Geometry and Camera Calibration

Interactive Computer Graphics. Warping and morphing. Warping and Morphing. Warping and Morphing. Lecture 14+15: Warping and Morphing. What is.

Viewing and Modeling

Advanced Computer Graphics Transformations. Matthias Teschner

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

Dual Arm Robot Research Report

Today s class. Geometric objects and transformations. Informationsteknologi. Wednesday, November 7, 2007 Computer Graphics - Class 5 1

Camera model & image formation SINA 07/08

USING ARTIFICIAL NEURAL NETWORKS TO APPROXIMATE A DISCRETE EVENT STOCHASTIC SIMULATION MODEL

Image Warping (Szeliski Sec 2.1.2)

Image Warping. Some slides from Steve Seitz

Transcription:

Computer Graphic Bing-Yu Chen National Taiwan Univerit The Univerit of Toko

Geometrical Tranformation Mathematical reliminarie 2D Tranformation Homogeneou Coorinate & Matri Repreentation 3D Tranformation Quaternion

Vector A vector i an entit that poee magnitue an irection. A ra irecte line egment, that poee poition, magnitue, an irection.

Vector vector an n-tuple of real number calar two operation: aition & multiplication Commutative Law a + b = b + a a b = b a Ientitie a + = a a = a Aociative Law a + b + c = a + b + c a b c = a b c Ditributive Law a b + c = a b + a c a + b c = a c + b c Invere a + b = b = -a

Aition of Vector parallelogram rule 7 6 3 6 3 2 3 w v v w

The Vector Dot rouct length = n v n n n v u u u u u

ropertie of the Dot rouct mmetric v w w v nonegenerate vv v onl when bilinear v u w vu v unit vector normalizing v v / v angle between the vector co v w/ v w w

rojection w u w co u v v w w v w vw

Matri Baic Definition Tranpoe Aition a a n A aij am a mn a an T C A cij aji C a m a nm C A B cij aij bij

Matri Baic Scalar-matri multiplication CA c ij a ij Matri-matri multiplication C AB c n a b ij ik kj k

Cro rouct of Vector Definition vw v2w3 v3w2 i v3w vw 3 j vw 2 v2w k i j k i,, j,, k,, where,, an are tanar unit vector: Application A normal vector to a polgon i calculate from 3 non-collinear vertice of the polgon. N vw N v w

General Tranformation A tranformation map point to other point an/or vector to other vector u v v T u T Q Q T

ipeline Implementation v u u v T tranformation from application program Tu Tv Tv Tu raterizer Tu vertice vertice piel frame buffer Tv

Repreentation We can repreent a point, in the plane a a column vector a a row vector p,

2D Tranformation 2D Tranlation 2D Scaling 2D Reflection 2D Shearing 2D Rotation

Tranlation Move tranlate, iplace a point to a new location Diplacement etermine b a vector Three egree of freeom =+

2D Tranlation 4,5 7,5 7,, ' T ' '

2D Scaling 4,5 7,5 7/2,5/4 2,5/4 ' ' ' S

2D Reflection 4,5 7,5-7,5-4,5 ' RE ' '

2D Shearing 4,5 7,5 9,5 2,5 ' SH ' h '

2D Rotation 4,5 7,5 2.,4.9 4.9,7.8 R co in in co ' ' '

2D Rotation Conier rotation about the origin b egree raiu ta the ame, angle increae b = r co f = r in f = co in = in + co = r co f = r in f

Limitation of a 2X2 matri Scaling Rotation Reflection Shearing What o we mi?

Homogeneou Coorinate Wh & What i homogeneou coorinate? if point are epree in homogeneou coorinate, all three tranformation can be treate a multiplication.,,, W uuall can not be

Homogeneou Coorinate W X W= plane Y

Homogeneou Coorinate for 2D Tranlation T ' ' ' ' ', ' T T T,, 2 2

Homogeneou Coorinate for 2D Tranlation,, 2 2 2 2 2 2 T T T T T T,,,, 2 2 2 2

Homogeneou Coorinate for 2D Scaling S ' ' ' ' ', ' S,, 2 2 2 2 2 2 S S

Homogeneou Coorinate for 2D Rotation co in in co ' ' ' R R co in in co ' ' '

ropertie of Tranformation rigi-bo tranformation rotation & tranlation preerving angle an length affine tranformation rotation & tranlation & caling preerving parallelim of line

Compoition of 2D Tranformation Original, After tranlation of to origin T, After rotation R After tranlation to original T,

Compoition of 2D Tranformation in co co in in co in co co in in co,, T R T

Right-hane Coorinate Stem z

3D Tranlation & 3D Scaling,, z z T,, z z S

3D Reflection & 3D Shearing RE RE SH h, h h h

3D Rotation co in in co R z co in in co R co in in co R z R R R z

Rotation About a Fie oint other than the Origin Move fie point to origin Rotate Move fie point back M T R T f f

Rotation About an Arbitrar Ai A rotation b about an arbitrar ai can be ecompoe into the concatenation of rotation about the,, an z ae,, are calle the Euler angle z R R R R z z z Note that rotation o not commute We can ue rotation in another orer but with ifferent angle. v

Euler Angle An Euler angle i a rotation about a ingle ai. A rotation i ecribe a a equence of rotation about three mutuall orthogonal coorinate ae fie in pace X-roll, Y-roll, Z-roll There are 6 poible wa to efine a rotation. 3! 42

Euler Angle & Interpolation Interpolation happening on each angle Multiple route for interpolation More ke for contrain R z z R 43

Interpolating Euler Angle c Natural orientation repreentation: 3 angle for 3 egree of freeom Unnatural interpolation: A rotation of 9 o firt aroun Z an then aroun Y = 2 o aroun,,. But 3 o aroun Z then Y iffer from 4 o aroun,,. b a b c a b a c = c b a b a c b b b c a c a c a 44

Solution: Quaternion Interpolation Interpolate orientation on the unit phere B analog: -, 2-, 3-DOF rotation a contraine point on -, 2-, 3- phere 47

Quaternion v Quaternion are unit vector on 3- phere in 4D Right-han rotation of raian about i q [co / 2,in / 2 v] often note [ wv, ] Require one real an three imaginar component i, j, k q q qi q2j q3k [ w, v]; w q, v q, q2, q3 2 2 2 where i j k ijk w i calle calar an v i calle vector v 49

Baic Operation Uing Quaternion Aition Multiplication * Conjugate Length Norm Invere Unit Quaternion q q [ w w, v v] qq [ w w v v, v v w v w v] q [ w, v] q w v 2 2 / 2 2 2 2 N q q w v * 2 * q q / q q / N q q i a unit quaternion if q an then q * Ientit [,,, ] when involving multiplication [,,, ] when involving aition q 5

SLER-Spherical Linear interolation Interpolate between two quaternion rotation along the hortet arc. SLER p, q, t p in t q in t in p where co w p wq v p vq t q If two orientation are too cloe, ue linear interpolation to avoi an iviion b zero. 55