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

Size: px
Start display at page:

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

Transcription

1 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 Standard transformations - Rotations, Translation, Scaling, Shear - Homogeneous coordinate transformation matrices - Constructing arbitrary transformation matrices from simple ones Transformations in OpenGL - Rotation, Translation, Scaling - OpenGL matrix modes + Model-view, Projection Feb-1-4 SMD159, Transformations 2 L INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET Standard Transformations Feb-1-4 SMD159, Transformations 3 L 1

2 General Transformations A transformation maps points to other points and/or vectors to other vectors v=t(u) Q=T(P) Feb-1-4 SMD159, Transformations 4 L Line preserving Affine Transformations Characteristic of many physically important transformations - Rigid body transformations: rotation, translation - Scaling, shear Importance in graphics is that: - Need only transform endpoints of line segments - Let implementation draw line segment between the transformed endpoints Feb-1-4 SMD159, Transformations 5 L Pipeline Implementation T (from application program) u v transformation T(u) T(v) rasterizer frame buffer v T(v) u T(u) T(u) vertices vertices pixels T(v) Feb-1-4 SMD159, Transformations 6 L 2

3 Notation Work with both: - Coordinate-free representations of transformations - Representations within a particular frame P,Q, R: points in an affine space u, v, w: vectors in an affine space a, b, g: scalars p, q, r: representations of points - array of 4 scalars in homogeneous coordinates u, v, w: representations of points - array of 4 scalars in homogeneous coordinates Feb-1-4 SMD159, Transformations 7 L Translation Move (translate, displace) a point to a new location P P d Displacement determined by a vector d - Three degrees of freedom - P =P+d Feb-1-4 SMD159, Transformations 8 L How Many Ways? Although we can move a point to a new location in infinite ways, when we move many points there is usually only one way object translation: every point displaced by same vector Feb-1-4 SMD159, Transformations 9 L 3

4 Translation Using Representations Using the homogeneous coordinate representation in some frame - p=[ x y z 1] T - p =[x y z 1] T - d=[dx dy dz ] T Hence p = p + d or - x =x+d x - y =y+d y - z =z+d z note that this expression is in four dimensions and expresses that point = vector + point Feb-1-4 SMD159, Transformations 1 L Translation Matrix We can also express translation using a 4 x 4 matrix T in homogeneous coordinates p =Tp where T = T(d x, d y, d z ) = È1 Î 1 1 dx d y dz 1 This form is better for implementation because: - All affine transformations can be expressed this way - Multiple transformations can be concatenated together Feb-1-4 SMD159, Transformations 11 L Rotation (2D) Consider rotation about the origin by q degrees - radius stays the same, angle increases by q x = r cos (f + q) y = r sin (f + q) x =x cos q y sin q y = x sin q + y cos q x = r cos f y = r sin f Feb-1-4 SMD159, Transformations 12 L 4

5 Rotation About the Z-Axis Rotation about z axis in three dimensions leaves all points with the same z - Equivalent to rotation in 2 dimensions in planes of constant z x =x cos q y sin q y = x sin q + y cos q z =z - or in homogeneous coordinates p = R z (q)p Feb-1-4 SMD159, Transformations 13 L Rotation Matrix R = R z (q) = Ècos q sin q Î - sin q cos q 1 1 Feb-1-4 SMD159, Transformations 14 L Rotation about x and y axes Same argument as for rotation about z axis - For rotation about x axis, x is unchanged - For rotation about y axis, y is unchanged È1 cos q - sin q R = R x (q) = sin q cos q Î 1 È cos q R = R y (q) = 1 - sin q sin q cos q Î 1 Feb-1-4 SMD159, Transformations 15 L 5

6 Scaling Expand or contract along each axis (fixed point of origin) x =s x x y =s y x z =s z x p =Sp Èsx S = S(s x, s y, s z ) = Î s y 1 Feb-1-4 SMD159, Transformations 16 L s z 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 Feb-1-4 SMD159, Transformations 17 L Inverses Could compute inverse matrices by general formulas, But, simple geometric observations are easier - Translation: T -1 (d x, d y, d z ) = T(-d x, -d y, -d z ) - Rotation: R -1 (q) = R(-q) +Holds for any rotation matrix +Note that since cos(-q) = cos(q) and sin(- q)=-sin(q), R -1 (q) = R T (q) - Scaling: S -1 (s x, s y, s z ) = S(1/s x, 1/s y, 1/s z ) Feb-1-4 SMD159, Transformations 18 L 6

7 Concatenation Form arbitrary affine transformation matrices by multiplying - Rotation, translation, and scaling matrices Same transformation is applied to many vertices: - Cost of forming a matrix M=ABCD is not significant compared to the cost of computing Mp for many vertices p Difficulty is forming a desired transformation Feb-1-4 SMD159, Transformations 19 L Order of Transformations Note that matrix on the right is the first applied Mathematically, the following are equivalent p = ABCp = A(B(Cp)) Note many references use column matrices to present points. In terms of column matrices p T = p T C T B T A T Feb-1-4 SMD159, Transformations 2 L General Rotation About the Origin A rotation by q about an arbitrary axis can be decomposed into the concatenation of rotations about the x, y, and z axes R(q) = R z (q z ) R y (q y ) R x (q x ) q x q y q z are called the Euler angles y v Note that rotations do not commute We can use rotations in another order but with different angles z Feb-1-4 SMD159, Transformations 21 L x 7

8 Rotation About a Fixed Point, Not the Origin Move fixed point to origin Rotate Move fixed point back M = T(-p f ) R(q) T(p f ) Feb-1-4 SMD159, Transformations 22 L Instancing In modeling, we often start with: - A simple object - Centered at the origin - Oriented with the axes - At a standard size We apply an instance transformation to its vertices to - Scale - Orient - Locate Feb-1-4 SMD159, Transformations 23 L Shear Helpful to add one more basic transformation Equivalent to pulling faces in opposite directions Feb-1-4 SMD159, Transformations 24 L 8

9 x = x + y cot q y = y z = z È1 H(q) = Î Shear Matrix Consider simple shear along the x-axis cot q Feb-1-4 SMD159, Transformations 25 L INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET Transformations in OpenGL Feb-1-4 SMD159, Transformations 26 L OpenGL Matrices In OpenGL matrices are part of the state Three types - Model-View (GL.GL_MODEL_VIEW) - Projection (GL.GL_PROJECTION) - Texture (GL.GL_TEXTURE) (ignore for now) Single set of functions for manipulation Select which to manipulated by - gl.glmatrixmode(gl_model_view); - gl.glmatrixmode(gl_projection); Feb-1-4 SMD159, Transformations 27 L 9

10 vertices Current Transformation Matrix (CTM) Conceptually, there is a 4 x 4 homogeneous coordinate matrix, the current transformation matrix (CTM) that is: - Part of the state - Applied to all vertices that pass down the pipeline The CTM is defined in the user program and loaded into a transformation unit p C CTM p =Cp vertices Feb-1-4 SMD159, Transformations 28 L CTM operations The CTM can be altered either by - Loading a new CTM - Postmutiplication Load an identity matrix: C I Load an arbitrary matrix: C M Load a translation matrix: C T Load a rotation matrix: C R Load a scaling matrix: C S Postmultiply by an arbitrary matrix: C CM Postmultiply by a translation matrix: C CT Postmultiply by a rotation matrix: C C R Postmultiply by a scaling matrix: C C S Feb-1-4 SMD159, Transformations 29 L Rotation about a Fixed Point Start with identity matrix: C I Move fixed point to origin: C CT -1 Rotate: C CR Move fixed point back: C CT Result: C = T -1 RT Each operation corresponds to one function call in the program. Note that the last operation specified is the first executed in the program Feb-1-4 SMD159, Transformations 3 L 1

11 CTM in OpenGL OpenGL has a model-view and a projection matrix in the pipeline which are concatenated together to form the CTM Can manipulate each by first setting the matrix mode Feb-1-4 SMD159, Transformations 31 L Rotation, Translation, Scaling Load an identity matrix gl.glloadidentity() Multiply on right gl.glrotatef(theta, vx, vy, vz) - theta in degrees, (vx, vy, vz) define axis of rotation gl.gltranslatef(dx, dy, dz) gl.glscalef( sx, sy, sz) Each has a float (f) and double (d) format (e.g., gl.glscaled) Feb-1-4 SMD159, Transformations 32 L Example Rotation about z axis by 3 degrees with a fixed point of (1., 2., 3.) gl.glmatrixmode(gl_modelview); gl.glloadidentity(); gl.gltranslatef(1., 2., 3.); gl.glrotatef(3.,.,.,.1); gl.gltranslatef(-1., -2., -3.); Remember that last matrix specified in the program is the first applied Feb-1-4 SMD159, Transformations 33 L 11

12 Arbitrary Matrices Can load and multiply by matrices defined in the application program gl.glloadmatrixf(m) gl.glmultmatrixf(m) The matrix m is a one dimension array of 16 elements which are the components of the desired 4 x 4 matrix stored by columns In glmultmatrixf, m multiplies the existing matrix on the right Feb-1-4 SMD159, Transformations 34 L Matrix Stacks In many situations we want to save transformation matrices for use later - Traversing hierarchical data structures (Chapter 9) - Avoiding state changes when executing display lists OpenGL maintains stacks for each type of matrix - Access present type (as set by glmatrixmode) by gl.glpushmatrix() gl.glpopmatrix() Feb-1-4 SMD159, Transformations 35 L Reading Back Matrices Can also access matrices (and other parts of the state) by enquiry (query) functions glgetintegerv glgetfloatv glgetbooleanv glgetdoublev glisenabled For matrices, we use as double m[16]; glgetfloatv(gl_modelview, m); Feb-1-4 SMD159, Transformations 36 L 12

13 Using Transformations Example: use idle function to rotate a cube and mouse function to change direction of rotation Start with a program that draws a cube (Cube.java) in a standard way - Centered at origin - Sides aligned with axes - Will discuss modeling in next lecture Feb-1-4 SMD159, Transformations 37 L Method main() public class Cube { public static void main(string[] args) { Frame simpleframe = new Frame("Cube from Chapter 4"); SimpleRenderer renderer = new SimpleRenderer(); GLCapabilities glc = new GLCapabilities(); glc.setdoublebuffered(true); GLCanvas drawable = GLDrawableFactory.getFactory().createGLCanvas(glc); drawable.addgleventlistener(renderer); simpleframe.add(drawable); simpleframe.setlocation(1,1); simpleframe.setsize(5, 522); final Animator animator = new Animator(drawable); simpleframe.addwindowlistener(new WindowAdapter() { public void windowclosing(windowevent e) {animator.stop(); System.exit(); ); simpleframe.show(); animator.start(); Feb-1-4 SMD159, Transformations 38 L Renderer static class SimpleRenderer implements GLEventListener, MouseListener { final double XMIN = -2., XMAX = 2., YMIN = -2., YMAX = 2.; double vertices[][] = { {-1.,-1.,-1., {1.,-1.,-1., {1.,1.,-1., {-1.,1.,-1., {-1.,-1.,1., {1.,-1.,1., {1.,1.,1., {-1.,1.,1., colors[][] = { {.,.,., {1.,.,., {1.,1.,., {.,1.,., {.,.,1., {1.,.,1., {1.,1.,1., {.,1.,1., theta[] = {.,.,.; int axis = 2; boolean firstreshape = true; public void displaychanged(gldrawable drawable, boolean modechanged, boolean devicechanged) { Feb-1-4 SMD159, Transformations 39 L 13

14 Method reshape( ) public void reshape(gldrawable drawable, int x, int y, int w, int h) { GL gl = drawable.getgl(); double scale = (w <= h)? (double) h / (double) w : (double) w / (double) h; gl.glviewport(x, y, w, h); gl.glmatrixmode(gl.gl_projection); // switch matrix mode gl. glloadidentity(); if(w<=h) gl.glortho(xmin,xmax,ymin*scale,ymax*scale,-1.,1.); else gl.glortho(xmin*scale,xmax*scale,ymin,ymax,-1.,1.); gl.glmatrixmode(gl.gl_modelview); // return to modelview mode gl.glclear(gl.gl_color_buffer_bit); if (firstreshape) firstreshape = false; else drawable.display(); Calling display on first pass causes an exception! Feb-1-4 SMD159, Transformations 4 L Method init( ) public void init(gldrawable drawable) { GL gl = drawable.getgl(); // get interfaces drawable.addmouselistener(this); gl.glclearcolor(f,f,f,f); // connect mouse // set bg and fill color gl.glmatrixmode(gl.gl_projection); // view intialization gl.glloadidentity(); gl.glortho(xmin, XMAX, YMIN, YMAX, -1., 1.); gl.glenable(gl.gl_depth_test); // enable z-buffer Feb-1-4 SMD159, Transformations 41 L Method display( ) public void display(gldrawable drawable) { GL gl = drawable.getgl(); gl.glclear(gl.gl_color_buffer_bit GL.GL_DEPTH_BUFFER_BIT); gl.glloadidentity(); gl.glrotated(theta[], 1.,.,.); gl.glrotated(theta[1],., 1.,.); gl.glrotated(theta[2],.,., 1.); colorcube(gl); spincube(); // draw cube // rotate for next draw gl.glflush(); Feb-1-4 SMD159, Transformations 42 L 14

15 Drawing the Cube private void cubeface(gl gl, int a, int b, int c, int d) { gl.glbegin(gl.gl_polygon); gl.glcolor3dv(colors[a]); gl.glvertex3dv(vertices[a]); gl.glcolor3dv(colors[b]); gl.glvertex3dv(vertices[b]); gl.glcolor3dv(colors[c]); gl.glvertex3dv(vertices[c]); gl.glcolor3dv(colors[d]); gl.glvertex3dv(vertices[d]); gl.glend(); Feb-1-4 SMD159, Transformations 43 L Drawing the Cube, private void colorcube(gl gl) { cubeface(gl,,3,2,1); cubeface(gl,2,3,7,6); cubeface(gl,,4,7,3); cubeface(gl,1,2,6,5); cubeface(gl,4,5,6,7); cubeface(gl,,1,5,4); private void spincube() { theta[axis] +=.2; if( theta[axis] > 36. ) theta[axis] -= 36.; Feb-1-4 SMD159, Transformations 44 L Mouse Interface public void mouseentered(mouseevent e) { public void mouseexited(mouseevent e) { public void mouseclicked(mouseevent e) { public void mousereleased(mouseevent e) { public void mousepressed(mouseevent e) { int button = e.getbutton(); switch (button) { case MouseEvent.BUTTON1: axis = ; break; case MouseEvent.BUTTON2: axis = 1; break; case MouseEvent.BUTTON3: axis = 2; break; Feb-1-4 SMD159, Transformations 45 L 15

16 Using the Model-View Matrix In OpenGL the model-view matrix is used to: - Position the camera + Can be done by rotations and translations but is often easier to use glulookat (Chapter 5) - Build models of obejcts The projection matrix is used to: - Define the view volume - Select a camera lens Although both are manipulated by the same functions, - Be careful because incremental changes are always made by post-multiplication - For example, rotating model-view and projection matrices by the same matrix are not equivalent operations. - Post-multiplication of the model-view matrix is equivalent to pre-multiplication of the projection matrix Feb-1-4 SMD159, Transformations 46 L Smooth Rotation From a practical standpoint, - Often want to use transformations to move and reorient an object smoothly - Problem: find a sequence of model-view matrices M,M 1,..,M n so that when they are applied successively to one or more objects we see a smooth transition For orientating an object - Can use the fact that every rotation corresponds to part of a great circle on a sphere - Find the axis of rotation and angle - Virtual trackball (see text) Feb-1-4 SMD159, Transformations 47 L Incremental Rotation Consider the two approaches - For a sequence of rotation matrices R,R 1,..,R n, find the Euler angles for each and use R i = R iz R iy R ix + Not very efficient - Use the final positions to determine the axis and angle of rotation, then increment only the angle Quaternions can be more efficient than either Feb-1-4 SMD159, Transformations 48 L 16

17 Quaternions Extension of imaginary numbers from two to three dimensions Requires 1 real and 3 imaginary components i, j, k q=q +q 1 i+q 2 j+q 3 k Quaternions can express rotations on sphere smoothly and efficiently. Process: - Model-view matrix Æ quaternion - Carry out operations with quaternions - Quaternion Æ Model-view matrix Feb-1-4 SMD159, Transformations 49 L Interfaces One of the major problems in interactive computer graphics is how to - Use 2D devices such as a mouse to interface with 3D obejcts Example: how to form an instance matrix? Some alternatives - Virtual trackball - 3D input devices such as the spaceball - Use areas of the screen + Distance from center controls angle, position, scale depending on mouse button depressed Feb-1-4 SMD159, Transformations 5 L Questions Feb-1-4 SMD159, Transformations 51 L 17

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

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

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

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

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

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

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 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

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

Transformations. Prof. George Wolberg Dept. of Computer Science City College of New York Transforations Prof. George Wolberg Dept. of Coputer Science City College of New York Objectives Introduce standard transforations - Rotations - Translation - Scaling - Shear Derive hoogeneous coordinate

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

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

Computer Viewing and Projection. Overview. Computer Viewing. David Carr Fundamentals of Computer Graphics Spring 2004 Based on Slides by E.

Computer Viewing and Projection. Overview. Computer Viewing. David Carr Fundamentals of Computer Graphics Spring 2004 Based on Slides by E. INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET Computer Viewing and Projection David Carr Fundamentals of Computer Graphics Spring 24 Based on Slides by E. Angel Projection 1 L Overview Computer

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

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

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

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

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. Transformation

More information

Chapter 3 - Basic Mathematics for 3D Computer Graphics

Chapter 3 - Basic Mathematics for 3D Computer Graphics Chapter 3 - Basic Mathematics for 3D Computer Graphics Three-Dimensional Geometric Transformations Affine Transformations and Homogeneous Coordinates OpenGL Matrix Logic Translation Add a vector t Geometrical

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

Modeling Transform. Chapter 4 Geometric Transformations. Overview. Instancing. Specify transformation for objects 李同益

Modeling Transform. Chapter 4 Geometric Transformations. Overview. Instancing. Specify transformation for objects 李同益 Modeling Transform Chapter 4 Geometric Transformations 李同益 Specify transformation for objects Allow definitions of objects in own coordinate systems Allow use of object definition multiple times in a scene

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

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

An Introduction to 2D OpenGL

An Introduction to 2D OpenGL An Introduction to 2D OpenGL January 23, 2015 OpenGL predates the common use of object-oriented programming. It is a mode-based system in which state information, modified by various function calls as

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

COMP3421. Vector geometry, Clipping

COMP3421. Vector geometry, Clipping COMP3421 Vector geometry, Clipping Transformations Object in model co-ordinates Transform into world co-ordinates Represent points in object as 1D Matrices Multiply by matrices to transform them Coordinate

More information

Computer Graphics. Bing-Yu Chen National Taiwan University

Computer Graphics. Bing-Yu Chen National Taiwan University Computer Graphics Bing-Yu Chen National Taiwan University Introduction to OpenGL General OpenGL Introduction An Example OpenGL Program Drawing with OpenGL Transformations Animation and Depth Buffering

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

Representations and Transformations. Objectives

Representations and Transformations. Objectives Repreentation and Tranformation Objective Derive homogeneou coordinate tranformation matrice Introduce tandard tranformation - Rotation - Tranlation - Scaling - Shear Scalar, Point, Vector Three baic element

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

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

COMP3421. Introduction to 3D Graphics

COMP3421. Introduction to 3D Graphics COMP3421 Introduction to 3D Graphics 3D coordinates 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

Transformations Computer Graphics I Lecture 4

Transformations Computer Graphics I Lecture 4 15-462 Computer Graphics I Lecture 4 Transformations Vector Spaces Affine and Euclidean Spaces Frames Homogeneous Coordinates Transformation Matrices January 23, 2003 [Angel, Ch. 4] Frank Pfenning Carnegie

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

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

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

Describe the Orthographic and Perspective projections. How do we combine together transform matrices?

Describe the Orthographic and Perspective projections. How do we combine together transform matrices? Aims and objectives By the end of the lecture you will be able to Work with multiple transform matrices Describe the viewing process in OpenGL Design and build a camera control APIs Describe the Orthographic

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

Transformations Computer Graphics I Lecture 4

Transformations Computer Graphics I Lecture 4 15-462 Computer Graphics I Lecture 4 Transformations Vector Spaces Affine and Euclidean Spaces Frames Homogeneous Coordinates Transformation Matrices January 24, 2002 [Angel, Ch. 4] Frank Pfenning Carnegie

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

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

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

Today. Today. Introduction. Matrices. Matrices. Computergrafik. Transformations & matrices Introduction Matrices Computergrafik Matthias Zwicker Universität Bern Herbst 2008 Today Transformations & matrices Introduction Matrices Homogeneous Affine transformations Concatenating transformations Change of Common coordinate

More information

Reading. Hierarchical Modeling. Symbols and instances. Required: Angel, sections , 9.8. Optional:

Reading. Hierarchical Modeling. Symbols and instances. Required: Angel, sections , 9.8. Optional: Reading Required: Angel, sections 9.1 9.6, 9.8 Optional: Hierarchical Modeling OpenGL rogramming Guide, the Red Book, chapter 3 cse457-07-hierarchical 1 cse457-07-hierarchical 2 Symbols and instances Most

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

CS 591B Lecture 9: The OpenGL Rendering Pipeline

CS 591B Lecture 9: The OpenGL Rendering Pipeline CS 591B Lecture 9: The OpenGL Rendering Pipeline 3D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination Spring 2007 Rui Wang 3D Polygon Rendering Many applications

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

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

Animation. Keyframe animation. CS4620/5620: Lecture 30. Rigid motion: the simplest deformation. Controlling shape for animation Keyframe animation CS4620/5620: Lecture 30 Animation Keyframing is the technique used for pose-to-pose animation User creates key poses just enough to indicate what the motion is supposed to be Interpolate

More information

Transformations. CSCI 420 Computer Graphics Lecture 4

Transformations. CSCI 420 Computer Graphics Lecture 4 CSCI 420 Computer Graphics Lecture 4 Transformations Jernej Barbic University of Southern California Vector Spaces Euclidean Spaces Frames Homogeneous Coordinates Transformation Matrices [Angel, Ch. 4]

More information

CSE328 Fundamentals of Computer Graphics

CSE328 Fundamentals of Computer Graphics CSE328 Fundamentals of Computer Graphics Hong Qin State University of New York at Stony Brook (Stony Brook University) Stony Brook, New York 794--44 Tel: (63)632-845; Fax: (63)632-8334 qin@cs.sunysb.edu

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

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

Chap 3 Viewing Pipeline Reading: Angel s Interactive Computer Graphics, Sixth ed. Sections 4.1~4.7

Chap 3 Viewing Pipeline Reading: Angel s Interactive Computer Graphics, Sixth ed. Sections 4.1~4.7 Chap 3 Viewing Pipeline Reading: Angel s Interactive Computer Graphics, Sixth ed. Sections 4.~4.7 Chap 3 View Pipeline, Comp. Graphics (U) CGGM Lab., CS Dept., NCTU Jung Hong Chuang Outline View parameters

More information

JOGL 3D GRAPHICS. Drawing a 3D line. In this chapter, let us see how to deal with 3D graphics.

JOGL 3D GRAPHICS. Drawing a 3D line. In this chapter, let us see how to deal with 3D graphics. http://www.tutorialspoint.com/jogl/jogl_3d_graphics.htm JOGL 3D GRAPHICS Copyright tutorialspoint.com In this chapter, let us see how to deal with 3D graphics. Drawing a 3D line Let us draw a simple line

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

Graphics pipeline and transformations. Composition of transformations

Graphics pipeline and transformations. Composition of transformations Graphics pipeline and transformations Composition of transformations Order matters! ( rotation * translation translation * rotation) Composition of transformations = matrix multiplication: if T is a rotation

More information

Transformation Pipeline

Transformation Pipeline Transformation Pipeline Local (Object) Space Modeling World Space Clip Space Projection Eye Space Viewing Perspective divide NDC space Normalized l d Device Coordinatesd Viewport mapping Screen space Coordinate

More information

EECE 478. Learning Objectives. Learning Objectives. Linear Algebra and 3D Geometry. Linear algebra in 3D. Coordinate systems

EECE 478. Learning Objectives. Learning Objectives. Linear Algebra and 3D Geometry. Linear algebra in 3D. Coordinate systems EECE 478 Linear Algebra and 3D Geometry Learning Objectives Linear algebra in 3D Define scalars, points, vectors, lines, planes Manipulate to test geometric properties Coordinate systems Use homogeneous

More information

Fachhochschule Regensburg, Germany, February 15, 2017

Fachhochschule Regensburg, Germany, February 15, 2017 s Operations Fachhochschule Regensburg, Germany, February 15, 2017 s Motivating Example s Operations To take a photograph of a scene: Set up your tripod and point camera at the scene (Viewing ) Position

More information

Overview. Affine Transformations (2D and 3D) Coordinate System Transformations Vectors Rays and Intersections

Overview. Affine Transformations (2D and 3D) Coordinate System Transformations Vectors Rays and Intersections Overview Affine Transformations (2D and 3D) Coordinate System Transformations Vectors Rays and Intersections ITCS 4120/5120 1 Mathematical Fundamentals Geometric Transformations A set of tools that aid

More information

CS354 Computer Graphics Rotations and Quaternions

CS354 Computer Graphics Rotations and Quaternions Slide Credit: Don Fussell CS354 Computer Graphics Rotations and Quaternions Qixing Huang April 4th 2018 Orientation Position and Orientation The position of an object can be represented as a translation

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

CS380: Computer Graphics 2D Imaging and Transformation. Sung-Eui Yoon ( 윤성의 ) Course URL:

CS380: Computer Graphics 2D Imaging and Transformation. Sung-Eui Yoon ( 윤성의 ) Course URL: CS380: Computer Graphics 2D Imaging and Transformation Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/cg Class Objectives Write down simple 2D transformation matrixes Understand the

More information

To Do. Outline. Translation. Homogeneous Coordinates. Foundations of Computer Graphics. Representation of Points (4-Vectors) Start doing HW 1

To Do. Outline. Translation. Homogeneous Coordinates. Foundations of Computer Graphics. Representation of Points (4-Vectors) Start doing HW 1 Foundations of Computer Graphics Homogeneous Coordinates Start doing HW 1 To Do Specifics of HW 1 Last lecture covered basic material on transformations in 2D Likely need this lecture to understand full

More information

For each question, indicate whether the statement is true or false by circling T or F, respectively.

For each question, indicate whether the statement is true or false by circling T or F, respectively. True/False For each question, indicate whether the statement is true or false by circling T or F, respectively. 1. (T/F) Rasterization occurs before vertex transformation in the graphics pipeline. 2. (T/F)

More information

GEOMETRIC OBJECTS AND TRANSFORMATIONS I

GEOMETRIC OBJECTS AND TRANSFORMATIONS I Computer UNIT Graphics - 4 and Visualization 6 Hrs GEOMETRIC OBJECTS AND TRANSFORMATIONS I Scalars Points, and vectors Three-dimensional primitives Coordinate systems and frames Modelling a colored cube

More information

Rendering Pipeline and Coordinates Transforms

Rendering Pipeline and Coordinates Transforms Rendering Pipeline and Coordinates Transforms Alessandro Martinelli alessandro.martinelli@unipv.it 16 October 2013 Rendering Pipeline (3): Coordinates Transforms Rendering Architecture First Rendering

More information

Buffers, Textures, Compositing, and Blending. Overview. Buffers. David Carr Virtual Environments, Fundamentals Spring 2005 Based on Slides by E.

Buffers, Textures, Compositing, and Blending. Overview. Buffers. David Carr Virtual Environments, Fundamentals Spring 2005 Based on Slides by E. INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET Buffers, Textures, Compositing, and Blending David Carr Virtual Environments, Fundamentals Spring 2005 Based on Slides by E. Angel Compositing,

More information

Translation. 3D Transformations. Rotation about z axis. Scaling. CS 4620 Lecture 8. 3 Cornell CS4620 Fall 2009!Lecture 8

Translation. 3D Transformations. Rotation about z axis. Scaling. CS 4620 Lecture 8. 3 Cornell CS4620 Fall 2009!Lecture 8 Translation 3D Transformations CS 4620 Lecture 8 1 2 Scaling Rotation about z axis 3 4 Rotation about x axis Rotation about y axis 5 6 Transformations in OpenGL Stack-based manipulation of model-view transformation,

More information

Geometric transformations assign a point to a point, so it is a point valued function of points. Geometric transformation may destroy the equation

Geometric transformations assign a point to a point, so it is a point valued function of points. Geometric transformation may destroy the equation Geometric transformations assign a point to a point, so it is a point valued function of points. Geometric transformation may destroy the equation and the type of an object. Even simple scaling turns a

More information

Transformations. CSCI 420 Computer Graphics Lecture 5

Transformations. CSCI 420 Computer Graphics Lecture 5 CSCI 420 Computer Graphics Lecture 5 Transformations Jernej Barbic University of Southern California Vector Spaces Euclidean Spaces Frames Homogeneous Coordinates Transformation Matrices [Angel, Ch. 3]

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

Transformations. OpenGL Transformations. 4x4 Model-view Matrix (this lecture) OpenGL Transformation Matrices. 4x4 Projection Matrix (next lecture)

Transformations. OpenGL Transformations. 4x4 Model-view Matrix (this lecture) OpenGL Transformation Matrices. 4x4 Projection Matrix (next lecture) CSCI 420 Computer Graphics Lecture 5 OpenGL Transformations Transformations Vector Spaces Euclidean Spaces Frames Homogeneous Coordinates Transformation Matrices Jernej Barbic [Angel, Ch. 3] University

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

CS 130 Final. Fall 2015

CS 130 Final. Fall 2015 CS 130 Final Fall 2015 Name Student ID Signature You may not ask any questions during the test. If you believe that there is something wrong with a question, write down what you think the question is trying

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

Geometric transformations in 3D and coordinate frames. Computer Graphics CSE 167 Lecture 3

Geometric transformations in 3D and coordinate frames. Computer Graphics CSE 167 Lecture 3 Geometric transformations in 3D and coordinate frames Computer Graphics CSE 167 Lecture 3 CSE 167: Computer Graphics 3D points as vectors Geometric transformations in 3D Coordinate frames CSE 167, Winter

More information

2D TRANSFORMATIONS AND MATRICES

2D TRANSFORMATIONS AND MATRICES 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 in A. T is the geometric transformation

More information

Renderer Implementation: Basics and Clipping. Overview. Preliminaries. David Carr Virtual Environments, Fundamentals Spring 2005

Renderer Implementation: Basics and Clipping. Overview. Preliminaries. David Carr Virtual Environments, Fundamentals Spring 2005 INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET Renderer Implementation: Basics and Clipping David Carr Virtual Environments, Fundamentals Spring 2005 Feb-28-05 SMM009, Basics and Clipping 1

More information

Transformations Week 9, Lecture 18

Transformations Week 9, Lecture 18 CS 536 Computer Graphics Transformations Week 9, Lecture 18 2D Transformations David Breen, William Regli and Maxim Peysakhov Department of Computer Science Drexel University 1 3 2D Affine Transformations

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

Monday, 12 November 12. Matrices

Monday, 12 November 12. Matrices Matrices Matrices Matrices are convenient way of storing multiple quantities or functions They are stored in a table like structure where each element will contain a numeric value that can be the result

More information

CS293: Java Graphics with JOGL, Solutions

CS293: Java Graphics with JOGL, Solutions UNIVERSITY OF SURREY c B.Sc. Undergraduate Programmes in Computing B.Sc. Undergraduate Programmes in Mathematical Studies Level HE2 Examination CS293: Java Graphics with JOGL, s Time allowed: 2 hours Spring

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

Rotations (and other transformations) Rotation as rotation matrix. Storage. Apply to vector matrix vector multiply (15 flops)

Rotations (and other transformations) Rotation as rotation matrix. Storage. Apply to vector matrix vector multiply (15 flops) Cornell University CS 569: Interactive Computer Graphics Rotations (and other transformations) Lecture 4 2008 Steve Marschner 1 Rotation as rotation matrix 9 floats orthogonal and unit length columns and

More information

Institutionen för systemteknik

Institutionen för systemteknik Code: Day: Lokal: M7002E 19 March E1026 Institutionen för systemteknik Examination in: M7002E, Computer Graphics and Virtual Environments Number of sections: 7 Max. score: 100 (normally 60 is required

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

3D GRAPHICS. design. animate. render

3D GRAPHICS. design. animate. render 3D GRAPHICS design animate render 3D animation movies Computer Graphics Special effects Computer Graphics Advertising Computer Graphics Games Computer Graphics Simulations & serious games Computer Graphics

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

Transformation Algebra

Transformation Algebra Transformation Algebra R. J. Renka Department of Computer Science & Engineering University of North Texas 0/07/205 Linear Transformations A point with Cartesian coordinates (x, y, z) is taken to be a column

More information

2D/3D Geometric Transformations and Scene Graphs

2D/3D Geometric Transformations and Scene Graphs 2D/3D Geometric Transformations and Scene Graphs Week 4 Acknowledgement: The course slides are adapted from the slides prepared by Steve Marschner of Cornell University 1 A little quick math background

More information

Computer Science 336 Fall 2017 Homework 2

Computer Science 336 Fall 2017 Homework 2 Computer Science 336 Fall 2017 Homework 2 Use the following notation as pseudocode for standard 3D affine transformation matrices. You can refer to these by the names below. There is no need to write out

More information

Jorg s Graphics Lecture Notes Coordinate Spaces 1

Jorg s Graphics Lecture Notes Coordinate Spaces 1 Jorg s Graphics Lecture Notes Coordinate Spaces Coordinate Spaces Computer Graphics: Objects are rendered in the Euclidean Plane. However, the computational space is better viewed as one of Affine Space

More information

CMSC 425: Lecture 6 Affine Transformations and Rotations

CMSC 425: Lecture 6 Affine Transformations and Rotations CMSC 45: Lecture 6 Affine Transformations and Rotations Affine Transformations: So far we have been stepping through the basic elements of geometric programming. We have discussed points, vectors, and

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

Polygonal Models. Overview. Simple Data Structures. David Carr Fundamentals of Computer Graphics Spring 2004 Based on Slides by E.

Polygonal Models. Overview. Simple Data Structures. David Carr Fundamentals of Computer Graphics Spring 2004 Based on Slides by E. INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET Polygonal Modls David Carr Fundamntals of Computr Graphics Spring 200 Basd on Slids by E. Angl Fb-3-0 SMD159, Polygonal Modls 1 L Ovrviw Simpl

More information

MORE OPENGL. Pramook Khungurn CS 4621, Fall 2011

MORE OPENGL. Pramook Khungurn CS 4621, Fall 2011 MORE OPENGL Pramook Khungurn CS 4621, Fall 2011 SETTING UP THE CAMERA Recall: OpenGL Vertex Transformations Coordinates specified by glvertex are transformed. End result: window coordinates (in pixels)

More information

Math background. 2D Geometric Transformations. Implicit representations. Explicit representations. Read: CS 4620 Lecture 6

Math background. 2D Geometric Transformations. Implicit representations. Explicit representations. Read: CS 4620 Lecture 6 Math background 2D Geometric Transformations CS 4620 Lecture 6 Read: Chapter 2: Miscellaneous Math Chapter 5: Linear Algebra Notation for sets, functions, mappings Linear transformations Matrices Matrix-vector

More information

Hierarchical Modeling. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

Hierarchical Modeling. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Hierarchical Modeling University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Reading Angel, sections 9.1-9.6 [reader pp. 169-185] OpenGL Programming Guide, chapter 3 Focus especially

More information

MET71 COMPUTER AIDED DESIGN

MET71 COMPUTER AIDED DESIGN UNIT - II BRESENHAM S ALGORITHM BRESENHAM S LINE ALGORITHM Bresenham s algorithm enables the selection of optimum raster locations to represent a straight line. In this algorithm either pixels along X

More information