Transformations. Prof. George Wolberg Dept. of Computer Science City College of New York

Size: px
Start display at page:

Download "Transformations. Prof. George Wolberg Dept. of Computer Science City College of New York"

Transcription

1 Transforations Prof. George Wolberg Dept. of Coputer Science City College of New York

2 Objectives Introduce standard transforations - Rotations - Translation - Scaling - Shear Derive hoogeneous coordinate transforation atrices Learn to build arbitrary transforation atrices fro siple transforations Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley 212 2

3 General Transforations A transforation aps points to other points and/or vectors to other vectors v=t(u) Q=T(P) Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley 212 3

4 Pipeline Ipleentation T (fro application progra) u v transforation T(u) T(v) rasterizer frae buffer v T(v) u T(u) T(u) vertices vertices pixels T(v) Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley 212 4

5 Translation Move (translate, displace) a point to a new location P P d Displaceent deterined by a vector d - Three degrees of freedo -P =P+d Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley 212 5

6 Object Translation Every point in object is displaced by sae vector object Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley 212 translation: every point is displaced by sae vector 6

7 Translation Using Representations Using the hoogeneous coordinate representation in soe frae p = [ x y z 1] T p = [x y z 1] T d = [dx dy dz ] T Hence p = p + d or x = x+dx y = y+dy z = z+dz note that this expression is in four diensions and expresses that point = vector + point Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley 212 7

8 Translation Matrix We can also express translation using a 4 x 4 atrix T in hoogeneous coordinates p =Tp where T = T(d x, d y, d z ) = This for is better for ipleentation because all affine transforations can be expressed this way and ultiple transforations can be concatenated together d d d x y z 1 Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley 212 8

9 Rotation (2D) Consider rotation about the origin by degrees - radius stays the sae, angle increases by x = r cos ( y = r sin ( x = x cos y sin y = x sin + y cos x = r cos y = r sin Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley 212 9

10 Rotation about the z-axis Rotation about z axis in three diensions leaves all points with the sae z - Equivalent to rotation in two diensions in planes of constant z x = x cos y sin y = x sin + y cos z = z - or in hoogeneous coordinates p =R z ()p Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley 212 1

11 Rotation Matrix R = R z () = cos sin sin cos 1 1 Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley

12 Rotation about x and y axes Sae arguent as for rotation about z-axis - For rotation about x-axis, x is unchanged - For rotation about y-axis, y is unchanged 1 cos - sin R = R x () = sin cos 1 cos sin R = R y () = 1 - sin cos 1 Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley

13 Scaling Expand or contract along each axis (fixed point of origin) x =s x x y =s y y z =s z z p =Sp S = S(s x, s y, s z ) = sx s y s z 1 Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley

14 Reflection corresponds to negative scale factors s x = -1 s y = 1 original s x = -1 s y = -1 s x = 1 s y = -1 Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley

15 Inverses Although we could copute inverse atrices by general forulas, we can use siple geoetric observations - Translation: T -1 (d x, d y, d z ) = T(-d x, -d y, -d z ) - Rotation: R -1 () = R(-) Holds for any rotation atrix Note that since cos(-) = cos() and sin(-)=-sin() R -1 () = R T () - Scaling: S -1 (s x, s y, s z ) = S(1/s x, 1/s y, 1/s z ) Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley

16 Concatenation We can for arbitrary affine transforation atrices by ultiplying together rotation, translation, and scaling atrices Because the sae transforation is applied to any vertices, the cost of foring a atrix M=ABCD is not significant copared to the cost of coputing Mp for any vertices p The difficult part is how to for a desired transforation fro the specifications in the application Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley

17 Order of Transforations Note that atrix on the right is the first applied Matheatically, the following are equivalent p = ABCp = A(B(Cp)) Note any references use colun atrices to present points. In ters of colun atrices p T = p T C T B T A T Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley

18 General Rotation About the Origin A rotation by about an arbitrary axis can be decoposed into the concatenation of rotations about the x, y, and z axes R() = R z ( z ) R y ( y ) R x ( x ) x y z are called the Euler angles y v Note that rotations do not coute We can use rotations in another order but with different angles z Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley 212 x 18

19 Rotation About a Fixed Point other than the Origin Move fixed point to origin Rotate Move fixed point back M = T(p f ) R() T(-p f ) Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley

20 Shear Helpful to add one ore basic transforation Equivalent to pulling faces in opposite directions Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley 212 2

21 Shear Matrix Consider siple shear along x axis x = x + y cot y = y z = z 1 H() = cot Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley

22 M A vertex is transfored by 4 4 atrices All atrices are stored colun-ajor in OpenGL - this is opposite of what C prograers expect Matrices are always post-ultiplied - product of atrix and vector is 3D Transforations Mv v v v v v

23 23 Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley 212 Affine Transforations Characteristic of any iportant transforations - Translation - Rotation - Scaling - Shear Line preserving ' ' ' z y x z y x

24 OpenGL Transforations Prof. George Wolberg Dept. of Coputer Science City College of New York

25 Objectives Learn how to carry out transforations in OpenGL - Rotation - Translation - Scaling Introduce QMatrix4x4 and QVector3D transforations - Model-view - Projection Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley

26 Current Transforation Matrix (CTM) Conceptually there is a 4 x 4 hoogeneous coordinate atrix, the current transforation atrix (CTM) that is part of the state and is applied to all vertices that pass down the pipeline The CTM is defined in the user progra and loaded into a transforation unit vertices p C CTM p =Cp vertices Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley

27 CTM operations The CTM can be altered either by loading a new CTM or by postutiplication Load an identity atrix: C I Load an arbitrary atrix: C M Load a translation atrix: C T Load a rotation atrix: C R Load a scaling atrix: C S Postultiply by an arbitrary atrix: C CM Postultiply by a translation atrix: C CT Postultiply by a rotation atrix: C CR Postultiply by a scaling atrix: C CS Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley

28 Rotation about a Fixed Point Start with identity atrix: C I Move fixed point to origin: C CT Rotate: C CR Move fixed point back: C CT -1 Result: C = TR T 1 which is backwards. This result is a consequence of doing postultiplications. Let s try again. Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley

29 Reversing the Order We want C = T 1 R T so we ust do the operations in the following order C I C CT -1 C CR C CT Each operation corresponds to one function call in the progra. The last operation specified is the first executed in the progra! Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley

30 Rotation, Translation, Scaling Create an identity atrix: QMatrix4x4 ;.settoidentity(); Multiply on right by rotation atrix of theta in degrees where (vx, vy, vz) define axis of rotation.rotate(theta, QVector3D(vx, vy, vz)); Do sae with translation and scaling:.scale(sx, sy, sz);.translate(dx, dy, dz); Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley 212 3

31 Exaple Rotation about z axis by 3 degrees with a fixed point of (1., 2., 3.) QMatrix4x4 ;.settoidentity();.translate( 1., 2., 3.);.rotate (3., QVector3D(.,., 1.));.translate(-1.,-2.,-3.); Reeber that the last atrix specified is the first applied Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley

32 Arbitrary Matrices Can load and ultiply by atrices defined in the application progra Matrices are stored as one diensional array of 16 eleents which are the coponents of the desired 4 x 4 atrix stored by coluns OpenGL functions that have atrices as paraeters allow the application to send the atrix or its transpose Angel/Shreiner: Interactive Coputer Graphics 6E Addison-Wesley

33 Vertex Shader for Rotation of Cube (1) in vec4 vposition; in vec4 vcolor; out vec4 color; unifor vec3 theta; void ain() { // Copute the sines and cosines of theta for // each of the three axes in one coputation. vec3 angles = radians( theta ); vec3 c = cos( angles ); vec3 s = sin( angles );

34 Vertex Shader for Rotation of Cube (2) // Reeber: these atrices are colun ajor at4 rx = at4( 1.,.,.,.,., c.x, s.x,.,., s.x, c.x,.,.,.,., 1. ); at4 ry = at4( c.y,., s.y,.,., 1.,.,., s.y,., c.y,.,.,.,., 1. );

35 Vertex Shader for Rotation of Cube (3) at4 rz = at4( c.z, s.z,.,., s.z, c.z,.,.,.,., 1.,.,.,.,., 1. ); } color = vcolor; gl_position = rz * ry * rx * vposition;

36 Sending Angles fro Application GLuint thetaid; // theta unifor location vec3 theta; // axis angles void display( void ) { glclear( GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT ); glunifor3fv( thetaid, 1, theta ); gldrawarrays( GL_TRIANGLES,, NuVertices ); }

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

Transformations. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Transformations Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Angel: Interactive Computer Graphics 4E Addison-Wesley 25 1 Objectives

More information

CS452/552; EE465/505. Transformations

CS452/552; EE465/505. Transformations CS452/552; EE465/55 Transformations 1-29-15 Outline! Transformations Read: Angel, Chapter 4 (study cube.html/cube.js example) Helpful links: Linear Algebra: Khan Academy Lab1 is posted on github, due:

More information

Introduction to Computer Graphics with WebGL

Introduction to Computer Graphics with WebGL 1 Introduction to Computer Graphics with WebGL Ed Angel Transformations General Transformations A transformation maps points to other points and/or vectors to other vectors v=t(u) Q=T(P) 2 Affine Transformations

More information

Transformations. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Transformations. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science Transformations CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science 1 Objectives Introduce standard transformations - Rotation - Translation - Scaling - Shear Derive

More information

Objectives. transformation. General Transformations. Affine Transformations. Notation. Pipeline Implementation. Introduce standard transformations

Objectives. transformation. General Transformations. Affine Transformations. Notation. Pipeline Implementation. Introduce standard transformations Objectives Transformations CS Interactive Computer Graphics Prof. David E. Breen Department of Computer Science Introduce standard transformations - Rotation - Translation - Scaling - Shear Derive homogeneous

More information

Basic Elements. Geometry is the study of the relationships among objects in an n-dimensional space

Basic Elements. Geometry is the study of the relationships among objects in an n-dimensional space Basic Elements Geometry is the study of the relationships among objects in an n-dimensional space In computer graphics, we are interested in objects that exist in three dimensions We want a minimum set

More information

Order of Transformations

Order of Transformations Order of Transformations Because the same transformation is applied to many vertices, the cost of forming a matrix M=ABCD is not significant compared to the cost of computing Mp for many vertices p Note

More information

CS 4204 Computer Graphics

CS 4204 Computer Graphics CS 424 Computer Graphics 2D Transformations Yong Cao Virginia Tech References: Introduction to Computer Graphics course notes by Doug Bowman Interactive Computer Graphics, Fourth Edition, Ed Angle Transformations

More information

Computer Graphics (CS 4731) Lecture 11: Implementing Transformations. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Computer Graphics (CS 4731) Lecture 11: Implementing Transformations. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI) Computer Graphics (CS 47) Lecture : Implementing Transformations Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Objectives Learn how to implement transformations in OpenGL

More information

Transformations. Overview. Standard Transformations. David Carr Fundamentals of Computer Graphics Spring 2004 Based on Slides by E.

Transformations. Overview. Standard Transformations. David Carr Fundamentals of Computer Graphics Spring 2004 Based on Slides by E. INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET Transformations David Carr Fundamentals of Computer Graphics Spring 24 Based on Slides by E. Angel Feb-1-4 SMD159, Transformations 1 L Overview

More information

Computer Graphics CS 543 Lecture 5 (Part 2) Implementing Transformations

Computer Graphics CS 543 Lecture 5 (Part 2) Implementing Transformations Computer Graphics CS 543 Lecture 5 (Part 2) Implementing Transformations Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Objectives Learn how to implement transformations

More information

Transformations. Standard Transformations. David Carr Virtual Environments, Fundamentals Spring 2005 Based on Slides by E. Angel

Transformations. Standard Transformations. David Carr Virtual Environments, Fundamentals Spring 2005 Based on Slides by E. Angel INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET Transformations David Carr Virtual Environments, Fundamentals Spring 25 Based on Slides by E. Angel Jan-27-5 SMM9, Transformations 1 L Overview

More information

Introduction to Computer Graphics with WebGL

Introduction to Computer Graphics with WebGL Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science Laboratory University of New Mexico WebGL Transformations

More information

Computer Graphics (CS 543) Lecture 4a: Introduction to Transformations

Computer Graphics (CS 543) Lecture 4a: Introduction to Transformations Coputer Graphics (CS 543) Lecture 4a: Introduction to Transforations Prof Eanuel Agu Coputer Science Dept. Worcester Polytechnic Institute (WPI) Hidden-Surface Reoval If ultiple surfaces overlap, we want

More information

Lecture 4: Transformations and Matrices. CSE Computer Graphics (Fall 2010)

Lecture 4: Transformations and Matrices. CSE Computer Graphics (Fall 2010) Lecture 4: Transformations and Matrices CSE 40166 Computer Graphics (Fall 2010) Overall Objective Define object in object frame Move object to world/scene frame Bring object into camera/eye frame Instancing!

More information

Mathematics in Computer Graphics and Games. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Mathematics in Computer Graphics and Games. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI) Matheatics in Coputer Graphics and Gaes Prof Eanuel Agu Coputer Science Dept. Worcester Polytechnic Institute (WPI) About Me Professor in WPI Coputer Science Dept Grad school at Uass Aherst (MS, PhD) Research

More information

CS452/552; EE465/505. Models & Viewing

CS452/552; EE465/505. Models & Viewing CS452/552; EE465/505 Models & Viewing 2-03 15 Outline! Building Polygonal Models Vertex lists; gl.drawarrays( ) Edge lists: gl.drawelements( )! Viewing Classical Viewing Read: Viewing in Web3D Angel, Section

More information

CS 543: Computer Graphics Lecture 4 (Part I): 3D Affine transforms. Emmanuel Agu

CS 543: Computer Graphics Lecture 4 (Part I): 3D Affine transforms. Emmanuel Agu CS 543: Coputer Graphics Lecture 4 (Part I): 3D Affine transfors Eanuel Agu Introduction to Transforations Introduce 3D affine transforation: Position (translation) Sie (scaling) Orientation (rotation)

More information

CS 543: Computer Graphics. 3D Transformations

CS 543: Computer Graphics. 3D Transformations CS 543: Coputer Graphics 3D Transforations Robert W. Lindean Associate Professor Interactive Media Gae Developent Departent of Coputer Science Worcester Poltechnic Institute gogo@wpi.edu (with lots of

More information

(Geometric) Camera Calibration

(Geometric) Camera Calibration (Geoetric) Caera Calibration CS635 Spring 217 Daniel G. Aliaga Departent of Coputer Science Purdue University Caera Calibration Caeras and CCDs Aberrations Perspective Projection Calibration Caeras First

More information

CSC 470 Computer Graphics

CSC 470 Computer Graphics CSC 470 Computer Graphics Transformations of Objects CSC 470 Computer Graphics, Dr.N. Georgieva, CSI/CUNY 1 Transformations of objects - 2D CSC 470 Computer Graphics, Dr.N. Georgieva, CSI/CUNY 2 Using

More information

Lecture 9: Transformations. CITS3003 Graphics & Animation

Lecture 9: Transformations. CITS3003 Graphics & Animation Lecture 9: Transformations CITS33 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 212 Objectives Introduce standard transformations Rotation Translation Scaling

More information

3D Mathematics. Co-ordinate systems, 3D primitives and affine transformations

3D Mathematics. Co-ordinate systems, 3D primitives and affine transformations 3D Mathematics Co-ordinate systems, 3D primitives and affine transformations Coordinate Systems 2 3 Primitive Types and Topologies Primitives Primitive Types and Topologies 4 A primitive is the most basic

More information

Computer Graphics (CS 4731) Lecture 11: Implementing Transformations. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Computer Graphics (CS 4731) Lecture 11: Implementing Transformations. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI) Computer Graphics (CS 47) Lecture : Implementing Transformations Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Objectives Learn how to implement transformations in OpenGL

More information

OpenGL pipeline Evolution and OpenGL Shading Language (GLSL) Part 2/3 Vertex and Fragment Shaders

OpenGL pipeline Evolution and OpenGL Shading Language (GLSL) Part 2/3 Vertex and Fragment Shaders OpenGL pipeline Evolution and OpenGL Shading Language (GLSL) Part 2/3 Vertex and Fragment Shaders Prateek Shrivastava CS12S008 shrvstv@cse.iitm.ac.in 1 GLSL Data types Scalar types: float, int, bool Vector

More information

Lecture 6 Sections 4.3, 4.6, 4.7. Wed, Sep 9, 2009

Lecture 6 Sections 4.3, 4.6, 4.7. Wed, Sep 9, 2009 Lecture 6 Sections 4.3, 4.6, 4.7 Hampden-Sydney College Wed, Sep 9, 2009 Outline 1 2 3 4 re are three mutually orthogonal axes: the x-axis, the y-axis, and the z-axis. In the standard viewing position,

More information

Computer Viewing. Prof. George Wolberg Dept. of Computer Science City College of New York

Computer Viewing. Prof. George Wolberg Dept. of Computer Science City College of New York Computer Viewing Prof. George Wolberg Dept. of Computer Science City College of New York Objectives Introduce the mathematics of projection Introduce OpenGL viewing functions Look at alternate viewing

More information

Computer Graphics. Chapter 5 Geometric Transformations. Somsak Walairacht, Computer Engineering, KMITL

Computer Graphics. Chapter 5 Geometric Transformations. Somsak Walairacht, Computer Engineering, KMITL Chapter 5 Geometric Transformations Somsak Walairacht, Computer Engineering, KMITL 1 Outline Basic Two-Dimensional Geometric Transformations Matrix Representations and Homogeneous Coordinates Inverse Transformations

More information

Computer Viewing. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Computer Viewing. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science Computer Viewing CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science 1 Objectives Introduce the mathematics of projection Introduce OpenGL viewing functions Look at

More information

Building Models. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Building Models. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science Building Models CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science 1 Objectives Introduce simple data structures for building polygonal models - Vertex lists - Edge

More information

Module Contact: Dr Rudy Lapeer (CMP) Copyright of the University of East Anglia Version 1

Module Contact: Dr Rudy Lapeer (CMP) Copyright of the University of East Anglia Version 1 UNIVERSITY OF EAST ANGLIA School of Coputing Sciences Main Series UG Exaination 2016-17 GRAPHICS 1 CMP-5010B Tie allowed: 2 hours Answer THREE questions. Notes are not peritted in this exaination Do not

More information

Transforms. COMP 575/770 Spring 2013

Transforms. COMP 575/770 Spring 2013 Transforms COMP 575/770 Spring 2013 Transforming Geometry Given any set of points S Could be a 2D shape, a 3D object A transform is a function T that modifies all points in S: T S S T v v S Different transforms

More information

Building Models. Prof. George Wolberg Dept. of Computer Science City College of New York

Building Models. Prof. George Wolberg Dept. of Computer Science City College of New York Building Models Prof. George Wolberg Dept. of Computer Science City College of New York Objectives Introduce simple data structures for building polygonal models - Vertex lists - Edge lists Deprecated

More information

Last week. Machiraju/Zhang/Möller/Fuhrmann

Last week. Machiraju/Zhang/Möller/Fuhrmann Last week Machiraju/Zhang/Möller/Fuhrmann 1 Geometry basics Scalar, point, and vector Vector space and affine space Basic point and vector operations Sided-ness test Lines, planes, and triangles Linear

More information

GEOMETRIC TRANSFORMATIONS AND VIEWING

GEOMETRIC TRANSFORMATIONS AND VIEWING GEOMETRIC TRANSFORMATIONS AND VIEWING 2D and 3D 1/44 2D TRANSFORMATIONS HOMOGENIZED Transformation Scaling Rotation Translation Matrix s x s y cosθ sinθ sinθ cosθ 1 dx 1 dy These 3 transformations are

More information

CS452/552; EE465/505. Geometry Transformations

CS452/552; EE465/505. Geometry Transformations CS452/552; EE465/505 Geometry Transformations 1-26-15 Outline! Geometry: scalars, points & vectors! Transformations Read: Angel, Chapter 4 (study cube.html/cube.js example) Appendix B: Spaces (vector,

More information

We will now take a closer look at the ideas behind the different types of symmetries that we have discussed by studying four different rigid motions.

We will now take a closer look at the ideas behind the different types of symmetries that we have discussed by studying four different rigid motions. hapter 11: The Matheatics of Syetry Sections 1-3: Rigid Motions Tuesday, pril 3, 2012 We will now take a closer look at the ideas behind the different types of syetries that we have discussed by studying

More information

Computer Graphics Geometric Transformations

Computer Graphics Geometric Transformations Computer Graphics 2016 6. Geometric Transformations Hongxin Zhang State Key Lab of CAD&CG, Zhejiang University 2016-10-31 Contents Transformations Homogeneous Co-ordinates Matrix Representations of Transformations

More information

Topic 7: Transformations. General Transformations. Affine Transformations. Introduce standard transformations

Topic 7: Transformations. General Transformations. Affine Transformations. Introduce standard transformations Tpic 7: Transfrmatins CITS33 Graphics & Animatin E. Angel and D. Shreiner: Interactive Cmputer Graphics 6E Addisn-Wesle 22 Objectives Intrduce standard transfrmatins Rtatin Translatin Scaling Shear Derive

More information

A simplified approach to merging partial plane images

A simplified approach to merging partial plane images A siplified approach to erging partial plane iages Mária Kruláková 1 This paper introduces a ethod of iage recognition based on the gradual generating and analysis of data structure consisting of the 2D

More information

Cassia County School District #151. Expected Performance Assessment Students will: Instructional Strategies. Performance Standards

Cassia County School District #151. Expected Performance Assessment Students will: Instructional Strategies. Performance Standards Unit 1 Congruence, Proof, and Constructions Doain: Congruence (CO) Essential Question: How do properties of congruence help define and prove geoetric relationships? Matheatical Practices: 1. Make sense

More information

Gromov-Hausdorff Distance Between Metric Graphs

Gromov-Hausdorff Distance Between Metric Graphs Groov-Hausdorff Distance Between Metric Graphs Jiwon Choi St Mark s School January, 019 Abstract In this paper we study the Groov-Hausdorff distance between two etric graphs We copute the precise value

More information

Graphics and Interaction Transformation geometry and homogeneous coordinates

Graphics and Interaction Transformation geometry and homogeneous coordinates 433-324 Graphics and Interaction Transformation geometry and homogeneous coordinates Department of Computer Science and Software Engineering The Lecture outline Introduction Vectors and matrices Translation

More information

CS D Transformation. Junqiao Zhao 赵君峤

CS D Transformation. Junqiao Zhao 赵君峤 CS10101001 3D Transformation Junqiao Zhao 赵君峤 Department of Computer Science and Technology College of Electronics and Information Engineering Tongji University Review Translation Linear transformation

More information

The Graphics Pipeline

The Graphics Pipeline The Graphics Pipeline Lecture 2 Robb T. Koether Hampden-Sydney College Wed, Aug 23, 2017 Robb T. Koether (Hampden-Sydney College) The Graphics Pipeline Wed, Aug 23, 2017 1 / 19 Outline 1 Vertices 2 The

More information

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates Department of Computer Science and Software Engineering The Lecture outline Introduction Vectors and matrices Translation

More information

Colorado School of Mines. Computer Vision. Professor William Hoff Dept of Electrical Engineering &Computer Science.

Colorado School of Mines. Computer Vision. Professor William Hoff Dept of Electrical Engineering &Computer Science. Professor Willia Hoff Dept of Electrical Engineering &Coputer Science http://inside.ines.edu/~whoff/ 1 Caera Calibration 2 Caera Calibration Needed for ost achine vision and photograetry tasks (object

More information

Geometry. Prof. George Wolberg Dept. of Computer Science City College of New York

Geometry. Prof. George Wolberg Dept. of Computer Science City College of New York Geometry Prof. George Wolberg Dept. of Computer Science City College of New York Objectives Introduce the elements of geometry -Scalars - Vectors - Points Develop mathematical operations among them in

More information

CS452/552; EE465/505. Review & Examples

CS452/552; EE465/505. Review & Examples CS452/552; EE465/505 Review & Examples 2-05 15 Outline Review and Examples:! Shaders, Buffers & Binding! Example: Draw 3 Triangles Vertex lists; gl.drawarrays( ) Edge lists: gl.drawelements( )! Example:

More information

Prove Theorems about Lines and Angles

Prove Theorems about Lines and Angles GEOMETRY Prove Theores about Lines and Angles OJECTIVE #: G.CO.9 OJECTIVE Prove theores about lines and angles. Theores include: vertical angles are congruent; when a transversal crosses parallel lines,

More information

Three Main Themes of Computer Graphics

Three Main Themes of Computer Graphics Three Main Themes of Computer Graphics Modeling How do we represent (or model) 3-D objects? How do we construct models for specific objects? Animation How do we represent the motion of objects? How do

More information

(Refer Slide Time: 00:04:20)

(Refer Slide Time: 00:04:20) Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 8 Three Dimensional Graphics Welcome back all of you to the lectures in Computer

More information

Clustering. Cluster Analysis of Microarray Data. Microarray Data for Clustering. Data for Clustering

Clustering. Cluster Analysis of Microarray Data. Microarray Data for Clustering. Data for Clustering Clustering Cluster Analysis of Microarray Data 4/3/009 Copyright 009 Dan Nettleton Group obects that are siilar to one another together in a cluster. Separate obects that are dissiilar fro each other into

More information

CS 432 Interactive Computer Graphics

CS 432 Interactive Computer Graphics CS 432 Interactive Computer Graphics Lecture 4 3D Viewing Matt Burlick - Drexel University - CS 432 1 Reading Angel Chapters 3-4 Red Book Chapter 5, Appendix E Matt Burlick - Drexel University - CS 432

More information

The Graphics Pipeline

The Graphics Pipeline The Graphics Pipeline Lecture 2 Robb T. Koether Hampden-Sydney College Fri, Aug 28, 2015 Robb T. Koether (Hampden-Sydney College) The Graphics Pipeline Fri, Aug 28, 2015 1 / 19 Outline 1 Vertices 2 The

More information

Building Models. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Building Models. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015 Building Models 1 Objectives Introduce simple data structures for building polygonal models Vertex lists Edge lists 2 Representing a Mesh Consider a mesh v 5 v 6 e e e 3 v 9 8 8 v e 4 1 e 11 e v v 7 7

More information

Interactive Computer Graphics. Hearn & Baker, chapter D transforms Hearn & Baker, chapter 5. Aliasing and Anti-Aliasing

Interactive Computer Graphics. Hearn & Baker, chapter D transforms Hearn & Baker, chapter 5. Aliasing and Anti-Aliasing Interactive Computer Graphics Aliasing and Anti-Aliasing Hearn & Baker, chapter 4-7 D transforms Hearn & Baker, chapter 5 Aliasing and Anti-Aliasing Problem: jaggies Also known as aliasing. It results

More information

Announcement. Project 1 has been posted online and in dropbox. Due: 11:59:59 pm, Friday, October 14

Announcement. Project 1 has been posted online and in dropbox. Due: 11:59:59 pm, Friday, October 14 Announcement Project 1 has been posted online and in dropbox Due: 11:59:59 pm, Friday, October 14 Project 1: Interactive Viewing of Two Teapots How to create a teapot? Before OpenGL 3., glutsolidteapot

More information

COMP3421. Introduction to 3D Graphics

COMP3421. Introduction to 3D Graphics COMP3421 Introduction to 3D Graphics 3D coodinates Moving to 3D is simply a matter of adding an extra dimension to our points and vectors: 3D coordinates 3D coordinate systems can be left or right handed.

More information

Computer Graphics. Chapter 7 2D Geometric Transformations

Computer Graphics. Chapter 7 2D Geometric Transformations Computer Graphics Chapter 7 2D Geometric Transformations Chapter 7 Two-Dimensional Geometric Transformations Part III. OpenGL Functions for Two-Dimensional Geometric Transformations OpenGL Geometric Transformation

More information

Transformations: 2D Transforms

Transformations: 2D Transforms 1. Translation Transformations: 2D Transforms Relocation of point WRT frame Given P = (x, y), translation T (dx, dy) Then P (x, y ) = T (dx, dy) P, where x = x + dx, y = y + dy Using matrix representation

More information

Comp 410/510 Computer Graphics Spring Programming with OpenGL Part 4: Three Dimensions

Comp 410/510 Computer Graphics Spring Programming with OpenGL Part 4: Three Dimensions Comp 410/510 Computer Graphics Spring 2018 Programming with OpenGL Part 4: Three Dimensions Objectives Develop a bit more sophisticated three-dimensional example - Rotating cube Introduce hidden-surface

More information

1 Transformations. Chapter 1. Transformations. Department of Computer Science and Engineering 1-1

1 Transformations. Chapter 1. Transformations. Department of Computer Science and Engineering 1-1 Transformations 1-1 Transformations are used within the entire viewing pipeline: Projection from world to view coordinate system View modifications: Panning Zooming Rotation 1-2 Transformations can also

More information

Affine Transformations in 3D

Affine Transformations in 3D Affine Transformations in 3D 1 Affine Transformations in 3D 1 Affine Transformations in 3D General form 2 Translation Elementary 3D Affine Transformations 3 Scaling Around the Origin 4 Along x-axis Shear

More information

Lecture 5 2D Transformation

Lecture 5 2D Transformation Lecture 5 2D Transformation What is a transformation? In computer graphics an object can be transformed according to position, orientation and size. Exactly what it says - an operation that transforms

More information

Weeks 1 3 Weeks 4 6 Unit/Topic Number and Operations in Base 10

Weeks 1 3 Weeks 4 6 Unit/Topic Number and Operations in Base 10 Weeks 1 3 Weeks 4 6 Unit/Topic Nuber and Operations in Base 10 FLOYD COUNTY SCHOOLS CURRICULUM RESOURCES Building a Better Future for Every Child - Every Day! Suer 2013 Subject Content: Math Grade 3rd

More information

Review of Thursday. xa + yb xc + yd

Review of Thursday. xa + yb xc + yd Review of Thursday Vectors and points are two/three-dimensional objects Operations on vectors (dot product, cross product, ) Matrices are linear transformations of vectors a c b x d y = xa + yb xc + yd

More information

Computer Graphics CS 543 Lecture 4 (Part 2) Building 3D Models (Part 2)

Computer Graphics CS 543 Lecture 4 (Part 2) Building 3D Models (Part 2) Computer Graphics CS 543 Lecture 4 (Part 2) Building 3D Models (Part 2) Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Modeling a Cube In 3D, declare vertices as (x,y,z)

More information

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

Transformations II. Arbitrary 3D Rotation. What is its inverse? What is its transpose? Can we constructively elucidate this relationship? Utah School of Computing Fall 25 Transformations II CS46 Computer Graphics From Rich Riesenfeld Fall 25 Arbitrar 3D Rotation What is its inverse? What is its transpose? Can we constructivel elucidate this

More information

2D and 3D Coordinate Systems and Transformations

2D and 3D Coordinate Systems and Transformations Graphics & Visualization Chapter 3 2D and 3D Coordinate Systems and Transformations Graphics & Visualization: Principles & Algorithms Introduction In computer graphics is often necessary to change: the

More information

6.1 Topological relations between two simple geometric objects

6.1 Topological relations between two simple geometric objects Chapter 5 proposed a spatial odel to represent the spatial extent of objects in urban areas. The purpose of the odel, as was clarified in Chapter 3, is ultifunctional, i.e. it has to be capable of supplying

More information

Object Representation Affine Transforms. Polygonal Representation. Polygonal Representation. Polygonal Representation of Objects

Object Representation Affine Transforms. Polygonal Representation. Polygonal Representation. Polygonal Representation of Objects Object Representation Affine Transforms Polygonal Representation of Objects Although perceivable the simplest form of representation they can also be the most problematic. To represent an object polygonally,

More information

A Basic Flight Simulator in Excel #3 calculating the

A Basic Flight Simulator in Excel #3 calculating the A Basic Flight Simulator in Excel #3 calculating the scene rotation and translation as a result of the plane movement - This section of the tutorial explains a simple method of creating the effect of a

More information

Hello, welcome to the video lecture series on Digital Image Processing. So in today's lecture

Hello, welcome to the video lecture series on Digital Image Processing. So in today's lecture Digital Image Processing Prof. P. K. Biswas Department of Electronics and Electrical Communications Engineering Indian Institute of Technology, Kharagpur Module 02 Lecture Number 10 Basic Transform (Refer

More information

Section III: TRANSFORMATIONS

Section III: TRANSFORMATIONS Section III: TRANSFORMATIONS in 2-D 2D TRANSFORMATIONS AND MATRICES Representation of Points: 2 x 1 matrix: X Y General Problem: [B] = [T] [A] [T] represents a generic operator to be applied to the points

More information

2D transformations: An introduction to the maths behind computer graphics

2D transformations: An introduction to the maths behind computer graphics 2D transformations: An introduction to the maths behind computer graphics Lecturer: Dr Dan Cornford d.cornford@aston.ac.uk http://wiki.aston.ac.uk/dancornford CS2150, Computer Graphics, Aston University,

More information

Viewing with Computers (OpenGL)

Viewing with Computers (OpenGL) We can now return to three-dimension?', graphics from a computer perspective. Because viewing in computer graphics is based on the synthetic-camera model, we should be able to construct any of the classical

More information

Modeling Objects by Polygonal Approximations. Linear and Affine Transformations (Maps)

Modeling Objects by Polygonal Approximations. Linear and Affine Transformations (Maps) Modeling Objects by Polygonal Approximations Define volumetric objects in terms of surfaces patches that surround the volume Each surface patch is approximated set of polygons Each polygon is specified

More information

DRAFT: Mathematical Background for Three-Dimensional Computer Graphics. Jonathan R. Senning Gordon College

DRAFT: Mathematical Background for Three-Dimensional Computer Graphics. Jonathan R. Senning Gordon College DRAFT: Mathematical Background for Three-Dimensional Computer Graphics Jonathan R. Senning Gordon College September 2006 ii Contents Introduction 2 Affine Geometry 3 2. Affine Space...................................

More information

Shadows. Prof. George Wolberg Dept. of Computer Science City College of New York

Shadows. Prof. George Wolberg Dept. of Computer Science City College of New York Shadows Prof. George Wolberg Dept. of Computer Science City College of New York Objectives Introduce Shadow Algorithms Expand to projective textures 2 Flashlight in the Eye Graphics When do we not see

More information

Novel Image Representation and Description Technique using Density Histogram of Feature Points

Novel Image Representation and Description Technique using Density Histogram of Feature Points Novel Iage Representation and Description Technique using Density Histogra of Feature Points Keneilwe ZUVA Departent of Coputer Science, University of Botswana, P/Bag 00704 UB, Gaborone, Botswana and Tranos

More information

Modeling with curves

Modeling with curves Modelin with curves Motivation Need representations of sooth real world objects Art / drawins usin C need sooth curves Aniation: caera paths (C) Dou Bowan, Virinia Tech, 2008 2 Naïve approach Siply use

More information

Overview. By end of the week:

Overview. By end of the week: Overview By end of the week: - Know the basics of git - Make sure we can all compile and run a C++/ OpenGL program - Understand the OpenGL rendering pipeline - Understand how matrices are used for geometric

More information

5-DOF Manipulator Simulation based on MATLAB- Simulink methodology

5-DOF Manipulator Simulation based on MATLAB- Simulink methodology 5-DOF Manipulator Siulation based on MATLAB- Siulink ethodology Velarde-Sanchez J.A., Rodriguez-Gutierrez S.A., Garcia-Valdovinos L.G., Pedraza-Ortega J.C., PICYT-CIDESI, CIDIT-Facultad de Inforatica,

More information

UNIT 2 2D TRANSFORMATIONS

UNIT 2 2D TRANSFORMATIONS UNIT 2 2D TRANSFORMATIONS Introduction With the procedures for displaying output primitives and their attributes, we can create variety of pictures and graphs. In many applications, there is also a need

More information

Smarter Balanced Assessment Consortium Claims, Targets, and Standard Alignment for Math

Smarter Balanced Assessment Consortium Claims, Targets, and Standard Alignment for Math Sarter Balanced Assessent Consortiu Clais, s, Stard Alignent for Math The Sarter Balanced Assessent Consortiu (SBAC) has created a hierarchy coprised of clais targets that together can be used to ake stateents

More information

Medical Biophysics 302E/335G/ st1-07 page 1

Medical Biophysics 302E/335G/ st1-07 page 1 Medical Biophysics 302E/335G/500 20070109 st1-07 page 1 STEREOLOGICAL METHODS - CONCEPTS Upon copletion of this lesson, the student should be able to: -define the ter stereology -distinguish between quantitative

More information

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

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner GLOBAL EDITION Interactive Computer Graphics A Top-Down Approach with WebGL SEVENTH EDITION Edward Angel Dave Shreiner This page is intentionall left blank. 4.10 Concatenation of Transformations 219 in

More information

CS 428: Fall Introduction to. Transformations in OpenGL + hierarchical modeling. Andrew Nealen, Rutgers, /21/2009 1

CS 428: Fall Introduction to. Transformations in OpenGL + hierarchical modeling. Andrew Nealen, Rutgers, /21/2009 1 CS 428: Fall 2009 Introduction to Computer Graphics Transformations in OpenGL + hierarchical modeling 9/21/2009 1 Review of affine transformations Use projective geometry staple of CG Euclidean (x,z) (x,y,z)

More information

2D and 3D Transformations AUI Course Denbigh Starkey

2D and 3D Transformations AUI Course Denbigh Starkey 2D and 3D Transformations AUI Course Denbigh Starkey. Introduction 2 2. 2D transformations using Cartesian coordinates 3 2. Translation 3 2.2 Rotation 4 2.3 Scaling 6 3. Introduction to homogeneous coordinates

More information

Fall CSCI 420: Computer Graphics. 2.2 Transformations. Hao Li.

Fall CSCI 420: Computer Graphics. 2.2 Transformations. Hao Li. Fall 2017 CSCI 420: Computer Graphics 2.2 Transformations Hao Li http://cs420.hao-li.com 1 OpenGL Transformations Matrices Model-view matrix (4x4 matrix) Projection matrix (4x4 matrix) vertices in 3D Model-view

More information

Computer Aided Drafting, Design and Manufacturing Volume 26, Number 2, June 2016, Page 13

Computer Aided Drafting, Design and Manufacturing Volume 26, Number 2, June 2016, Page 13 Coputer Aided Drafting, Design and Manufacturing Volue 26, uber 2, June 2016, Page 13 CADDM 3D reconstruction of coplex curved objects fro line drawings Sun Yanling, Dong Lijun Institute of Mechanical

More information

Computer Graphics 7: Viewing in 3-D

Computer Graphics 7: Viewing in 3-D Computer Graphics 7: Viewing in 3-D In today s lecture we are going to have a look at: Transformations in 3-D How do transformations in 3-D work? Contents 3-D homogeneous coordinates and matrix based transformations

More information

COMP3421. Week 2 - Transformations in 2D and Vector Geometry Revision

COMP3421. Week 2 - Transformations in 2D and Vector Geometry Revision COMP3421 Week 2 - Transformations in 2D and Vector Geometry Revision Exercise 1. Write code to draw (an approximation) of the surface of a circle at centre 0,0 with radius 1 using triangle fans. 2. At

More information

Research Article A Comparison of Standard One-Step DDA Circular Interpolators with a New Cheap Two-Step Algorithm

Research Article A Comparison of Standard One-Step DDA Circular Interpolators with a New Cheap Two-Step Algorithm Modelling and Siulation in Engineering, Article ID 916539, 6 pages http://dx.doi.org/10.1155/2014/916539 Research Article A Coparison of Standard One-Step DDA Circular Interpolators with a New Cheap Two-Step

More information

CSE528 Computer Graphics: Theory, Algorithms, and Applications

CSE528 Computer Graphics: Theory, Algorithms, and Applications CSE528 Computer Graphics: Theory, Algorithms, and Applications Hong Qin Stony Brook University (SUNY at Stony Brook) Stony Brook, New York 11794-2424 Tel: (631)632-845; Fax: (631)632-8334 qin@cs.stonybrook.edu

More information

1 OpenGL - column vectors (column-major ordering)

1 OpenGL - column vectors (column-major ordering) OpenGL - column vectors (column-major ordering) OpenGL uses column vectors and matrices are written in a column-major order. As a result, matrices are concatenated in right-to-left order, with the first

More information

Vector Algebra Transformations. Lecture 4

Vector Algebra Transformations. Lecture 4 Vector Algebra Transformations Lecture 4 Cornell CS4620 Fall 2008 Lecture 4 2008 Steve Marschner 1 Geometry A part of mathematics concerned with questions of size, shape, and relative positions of figures

More information

COMP3421. Introduction to 3D Graphics

COMP3421. Introduction to 3D Graphics COMP3421 Introduction to 3D Graphics 3D coodinates Moving to 3D is simply a matter of adding an extra dimension to our points and vectors: 3D coordinates 3D coordinate systems can be left or right handed.

More information

COMPUTER GENERATED HOLOGRAMS Optical Sciences 627 W.J. Dallas (Monday, August 23, 2004, 12:38 PM) PART III: CHAPTER ONE DIFFUSERS FOR CGH S

COMPUTER GENERATED HOLOGRAMS Optical Sciences 627 W.J. Dallas (Monday, August 23, 2004, 12:38 PM) PART III: CHAPTER ONE DIFFUSERS FOR CGH S COPUTER GEERATED HOLOGRAS Optical Sciences 67 W.J. Dallas (onday, August 3, 004, 1:38 P) PART III: CHAPTER OE DIFFUSERS FOR CGH S Part III: Chapter One Page 1 of 8 Introduction Hologras for display purposes

More information