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

Size: px
Start display at page:

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

Transcription

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

2 This page is intentionall left blank.

3 4.10 Concatenation of Transformations 219 in the same direction simplifies the subsequent steps. We sa that v is the result of normaliing u. We have alread seen that moving the fied point to the origin is a helpful technique. Thus, our first transformation is the translation T( p 0 ), and the final one is T(p 0 ). After the initial translation, the required rotation problem is as shown in Figure Our previous eample (see Section ) showed that we could get an arbitrar rotation from three rotations about the individual aes. This problem is more difficult because we do not know what angles to use for the individual rotations. Our strateg is to carr out two rotations to align the ais of rotation, v, with the -ais. Then we can rotate b θ about the -ais, after which we can undo the two rotations that did the aligning. Our final rotation matri will be of the form R = R ( θ )R ( θ )R (θ)r (θ )R (θ ). This sequence of rotations is shown in Figure The difficult part of the process is determining θ and θ. We proceed b looking at the components of v. Because v is a unit-length vector, α 2 + α2 + α2 = 1. p 2 p 1 v FIGURE 4.53 Movement of the fied point to the origin. FIGURE 4.54 Sequence of rotations.

4 220 Chapter 4 Geometric Objects and Transformations (,, ) We draw a line segment from the origin to the point (α, α, α ). This line segment has unit length and the orientation of v. Net, we draw the perpendiculars from the point (α, α, α ) to the coordinate aes, as shown in Figure The three direction angles φ, φ, φ are the angles between the line segment (or v) and the aes. The direction cosines are given b cos φ = α, cos φ = α, FIGURE 4.55 Direction angles. cos φ = α. Onl two of the direction angles are independent, because d 1 (,, ) FIGURE 4.56 Computation of the rotation. d FIGURE 4.57 Computation of the rotation. 1 cos 2 φ + cos 2 φ + cos 2 φ = 1. We can now compute θ and θ using these angles. Consider Figure It shows that the effect of the desired rotation on the point (α, α, α ) is to rotate the line segment into the plane = 0. If we look at the projection of the line segment (before the rotation) on the plane = 0, we see a line segment of length d on this plane. Another wa to envision this figure is to think of the plane = 0 as a wall and consider a distant light source located far down the positive -ais. The line that we see on the wall is the shadow of the line segment from the origin to (α, α, α ). Note that the length of the shadow is less than the length of the line segment. We can sa the line segment has been foreshortened to d = α 2 + α2. The desired angle of rotation is determined b the angle that this shadow makes with the -ais. However, the rotation matri is determined b the sine and cosine of θ. Thus, we never need to compute θ ; rather, we need onl compute α R (θ ) = /d α /d 0 0 α /d α /d We compute R in a similar manner. Figure 4.57 shows the rotation. This angle is clockwise about the -ais; therefore, we have to be careful about the sign of the sine terms in the matri, which is d 0 α R (θ ) = α 0 d Finall, we concatenate all the matrices to find M = T(p 0 )R ( θ )R ( θ )R (θ)r (θ )R (θ )T( p 0 ).

5 4.11 Transformation Matrices in WebGL 221 Let s look at a specific eample. Suppose that we wish to rotate an object b 45 degrees about the line passing through the origin and the point (1, 2, 3). We leave the fied point at the origin. The first step is to find the point along the line that is a unit distance from the origin. We obtain it b normaliing (1, 2, 3) to (1/, 2/, 3/ ), or(1/, 2/, 3/, 1) in homogeneous coordinates. The first part of the rotation takes this point to (0, 0, 1, 1). We first rotate about the -ais b the angle cos 1 3. This matri carries (1/, 2/, 3/, 1) to (1/, 0, 13/, 1), which is in the plane = 0. The rotation must be b the angle cos 1 ( 13/). This rotation aligns the object with the -ais, and now we can rotate about the -ais b the desired 45 degrees. Finall, we undo the first two rotations. If we concatenate these five transformations into a single rotation matri R, we find that ( ) ( R = R cos 1 3 R cos ( ) R cos = ) R (45) R ( ) cos 1 13 This matri does not change an point on the line passing through the origin and the point (1, 2, 3). If we want a fied point other than the origin, we form the matri M = T(p f )RT( p f ). This eample is not trivial. It illustrates the powerful technique of appling man simple transformations to get a comple one. The problem of rotation about an arbitrar point or ais arises in man applications. The major variations lie in the manner in which the ais of rotation is specified. However, we can usuall emplo techniques similar to the ones that we have used here to determine direction angles or direction cosines TRANSFORMATION MATRICES IN WEBGL We can now focus on the implementation of a homogeneous-coordinate transformation package and that package s interface to the user. We have introduced a set of frames, including the world frame and the camera frame, that should be important for developing applications. In a shader-based implementation of OpenGL, the eistence or noneistence of these frames is entirel dependent on what the application

6 222 Chapter 4 Geometric Objects and Transformations Vertices CTM Vertices FIGURE 4.58 Current transformation matri (CTM). programmer decides to do. 9 In a modern implementation of OpenGL, the application programmer can choose not onl which frames to use but also where to carr out the transformations between frames. Some will best be carried out in the application, others in a shader. As we develop a method for specifing and carring out transformations, we should emphasie the importance of state. Although ver few state variables are predefined in WebGL, once we specif various attributes and matrices, the effectivel define the state of the sstem. Thus, when a verte is processed, how it is processed is determined b the values of these state variables. The two transformations that we will use most often are the model-view transformation and the projection transformation. The model-view transformation brings representations of geometric objects from the application or object frame to the camera frame. The projection matri will both carr out the desired projection and change the representation to clip coordinates. We will use onl the model-view matri in this chapter. The model-view matri normall is an affine transformation matri and has onl 12 degrees of freedom, as discussed in Section 4.7. The projection matri, as we will see in Chapter 5, is also a 4 4 matri but is not affine Current Transformation Matrices The generaliation common to most graphics sstems is of a current transformation matri (CTM). The CTM is part of the pipeline (Figure 4.58); thus, if p isaverte specified in the application, then the pipeline produces Cp. Note that Figure 4.58 does not indicate where in the pipeline the current transformation matri is applied. If we use a CTM, we can regard it as part of the state of the sstem. First, we will introduce a simple set of functions that we can use to form and manipulate 4 4 affine transformation matrices. Let C denote the CTM (or an other 4 4 affine matri). Initiall, we will set it to the 4 4 identit matri; it can be reinitialied as needed.if we use the smbol to denote replacement, we can write this initialiation operation as C I. The functions that alter C are of three forms: those that load it with some matri and those that modif it b premultiplication or postmultiplication b a matri. The three transformations supported in most sstems are translation, scaling with a fied point of the origin, and rotation with a fied point of the origin. Smbolicall, we can write 9. In earlier versions of OpenGL that relied on the fied-function pipeline, the model-view and projection matrices were part of the specification and their state was part of the environment.

7 4.11 Transformation Matrices in WebGL 223 these operations in postmultiplication form as C CT C CS C CR and in load form as C T C S C R. Most sstems allow us to load the CTM with an arbitrar matri M, C M, or to postmultipl b an arbitrar matri M, C CM. Although we will occasionall use functions that set a matri, most of the time we will alter an eisting matri; that is, the operation C CR, is more common than the operation C R Basic Matri Functions Using our matri tpes, we can create and manipulate three- and four-dimensional matrices. Because we will work mostl in three dimensions using four-dimensional homogeneous coordinates, we will illustrate onl that case. We can create an identit matri b var a = mat4(); or fill it with components b var a = mat4(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,, 15); or b vectors as in var a = mat4( vec4(0, 1, 2, 3), vec4(4, 5, 6, 7), vec4(8, 9, 10, 11), vec4(12, 13,, 15) );

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

What and Why Transformations?

What and Why Transformations? 2D transformations What and Wh Transformations? What? : The geometrical changes of an object from a current state to modified state. Changing an object s position (translation), orientation (rotation)

More information

3-Dimensional Viewing

3-Dimensional Viewing CHAPTER 6 3-Dimensional Vieing Vieing and projection Objects in orld coordinates are projected on to the vie plane, hich is defined perpendicular to the vieing direction along the v -ais. The to main tpes

More information

Modeling Transformations

Modeling Transformations Modeling Transformations Michael Kazhdan (601.457/657) HB Ch. 5 FvDFH Ch. 5 Overview Ra-Tracing so far Modeling transformations Ra Tracing Image RaTrace(Camera camera, Scene scene, int width, int heigh,

More information

4. Two Dimensional Transformations

4. Two Dimensional Transformations 4. Two Dimensional Transformations CS362 Introduction to Computer Graphics Helena Wong, 2 In man applications, changes in orientations, sizes, and shapes are accomplished with geometric transformations

More information

CS Computer Graphics: Transformations & The Synthetic Camera

CS Computer Graphics: Transformations & The Synthetic Camera CS 543 - Computer Graphics: Transformations The Snthetic Camera b Robert W. Lindeman gogo@wpi.edu (with help from Emmanuel Agu ;-) Introduction to Transformations A transformation changes an objects Size

More information

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

1. We ll look at: Types of geometrical transformation. Vector and matrix representations Tob Howard COMP272 Computer Graphics and Image Processing 3: Transformations Tob.Howard@manchester.ac.uk Introduction We ll look at: Tpes of geometrical transformation Vector and matri representations

More information

Lecture 4: Viewing. Topics:

Lecture 4: Viewing. Topics: Lecture 4: Viewing Topics: 1. Classical viewing 2. Positioning the camera 3. Perspective and orthogonal projections 4. Perspective and orthogonal projections in OpenGL 5. Perspective and orthogonal projection

More information

High Dimensional Rendering in OpenGL

High Dimensional Rendering in OpenGL High Dimensional Rendering in OpenGL Josh McCo December, 2003 Description of Project Adding high dimensional rendering capabilit to the OpenGL graphics programming environment is the goal of this project

More information

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

CSE328 Fundamentals of Computer Graphics: Theory, Algorithms, and Applications CSE328 Fundamentals of Computer Graphics: Theor, Algorithms, and Applications Hong in State Universit of New York at Ston Brook (Ston Brook Universit) Ston Brook, New York 794-44 Tel: (63)632-845; Fa:

More information

Modeling Transformations

Modeling Transformations Modeling Transformations Michael Kazhdan (601.457/657) HB Ch. 5 FvDFH Ch. 5 Announcement Assignment 2 has been posted: Due: 10/24 ASAP: Download the code and make sure it compiles» On windows: just build

More information

Two Dimensional Viewing

Two Dimensional Viewing Two Dimensional Viewing Dr. S.M. Malaek Assistant: M. Younesi Two Dimensional Viewing Basic Interactive Programming Basic Interactive Programming User controls contents, structure, and appearance of objects

More information

Computer Graphics. P04 Transformations. Aleksandra Pizurica Ghent University

Computer Graphics. P04 Transformations. Aleksandra Pizurica Ghent University Computer Graphics P4 Transformations Aleksandra Pizurica Ghent Universit Telecommunications and Information Processing Image Processing and Interpretation Group Transformations in computer graphics Goal:

More information

1/29/13. Computer Graphics. Transformations. Simple Transformations

1/29/13. Computer Graphics. Transformations. Simple Transformations /29/3 Computer Graphics Transformations Simple Transformations /29/3 Contet 3D Coordinate Sstems Right hand (or counterclockwise) coordinate sstem Left hand coordinate sstem Not used in this class and

More information

CS770/870 Spring 2017 Transformations

CS770/870 Spring 2017 Transformations CS770/870 Spring 2017 Transformations Coordinate sstems 2D Transformations Homogeneous coordinates Matrices, vectors, points Coordinate Sstems Coordinate sstems used in graphics Screen coordinates: the

More information

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

(x, y) (ρ, θ) ρ θ. Polar Coordinates. Cartesian Coordinates Coordinate Sstems Point Representation in two dimensions Cartesian Coordinates: (; ) Polar Coordinates: (; ) (, ) ρ θ (ρ, θ) Cartesian Coordinates Polar Coordinates p = CPS1, 9: Computer Graphics D Geometric

More information

Introduction to Homogeneous Transformations & Robot Kinematics

Introduction to Homogeneous Transformations & Robot Kinematics Introduction to Homogeneous Transformations & Robot Kinematics Jennifer Ka Rowan Universit Computer Science Department. Drawing Dimensional Frames in 2 Dimensions We will be working in -D coordinates,

More information

What does OpenGL do?

What does OpenGL do? Theor behind Geometrical Transform What does OpenGL do? So the user specifies a lot of information Ee Center Up Near, far, UP EE Left, right top, bottom, etc. f b CENTER left right top bottom What does

More information

Modeling Transformations Revisited

Modeling Transformations Revisited Modeling Transformations Revisited Basic 3D Transformations Translation Scale Shear Rotation 3D Transformations Same idea as 2D transformations o Homogeneous coordinates: (,,z,w) o 44 transformation matrices

More information

Computer Graphics. Geometric Transformations

Computer Graphics. Geometric Transformations Contents coordinate sstems scalar values, points, vectors, matrices right-handed and left-handed coordinate sstems mathematical foundations transformations mathematical descriptions of geometric changes,

More information

Computer Graphics. Geometric Transformations

Computer Graphics. Geometric Transformations Computer Graphics Geometric Transformations Contents coordinate sstems scalar values, points, vectors, matrices right-handed and left-handed coordinate sstems mathematical foundations transformations mathematical

More information

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

Today s class. Geometric objects and transformations. Informationsteknologi. Wednesday, November 7, 2007 Computer Graphics - Class 5 1 Toda s class Geometric objects and transformations Wednesda, November 7, 27 Computer Graphics - Class 5 Vector operations Review of vector operations needed for working in computer graphics adding two

More information

Chap 7, 2009 Spring Yeong Gil Shin

Chap 7, 2009 Spring Yeong Gil Shin Three-Dimensional i Viewingi Chap 7, 29 Spring Yeong Gil Shin Viewing i Pipeline H d fi i d? How to define a window? How to project onto the window? Rendering "Create a picture (in a snthetic camera) Specification

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

Introduction to Homogeneous Transformations & Robot Kinematics

Introduction to Homogeneous Transformations & Robot Kinematics Introduction to Homogeneous Transformations & Robot Kinematics Jennifer Ka, Rowan Universit Computer Science Department Januar 25. Drawing Dimensional Frames in 2 Dimensions We will be working in -D coordinates,

More information

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

Determining the 2d transformation that brings one image into alignment (registers it) with another. And Last two lectures: Representing an image as a weighted combination of other images. Toda: A different kind of coordinate sstem change. Solving the biggest problem in using eigenfaces? Toda Recognition

More information

5.8.3 Oblique Projections

5.8.3 Oblique Projections 278 Chapter 5 Viewing y (, y, ) ( p, y p, p ) Figure 537 Oblique projection P = 2 left right 0 0 left+right left right 0 2 top bottom 0 top+bottom top bottom far+near far near 0 0 far near 2 0 0 0 1 Because

More information

[ ] [ ] Orthogonal Transformation of Cartesian Coordinates in 2D & 3D. φ = cos 1 1/ φ = tan 1 [ 2 /1]

[ ] [ ] Orthogonal Transformation of Cartesian Coordinates in 2D & 3D. φ = cos 1 1/ φ = tan 1 [ 2 /1] Orthogonal Transformation of Cartesian Coordinates in 2D & 3D A vector is specified b its coordinates, so it is defined relative to a reference frame. The same vector will have different coordinates in

More information

Geometric Transformations

Geometric Transformations CS INTRODUCTION TO COMPUTER GRAPHICS Geometric Transformations D and D Andries an Dam 9/9/7 /46 CS INTRODUCTION TO COMPUTER GRAPHICS How do we use Geometric Transformations? (/) Objects in a scene at the

More information

CMSC 425: Lecture 10 Basics of Skeletal Animation and Kinematics

CMSC 425: Lecture 10 Basics of Skeletal Animation and Kinematics : Lecture Basics of Skeletal Animation and Kinematics Reading: Chapt of Gregor, Game Engine Architecture. The material on kinematics is a simplification of similar concepts developed in the field of robotics,

More information

CS559: Computer Graphics

CS559: Computer Graphics CS559: Computer Graphics Lecture 8: 3D Transforms Li Zhang Spring 28 Most Slides from Stephen Chenne Finish Color space Toda 3D Transforms and Coordinate sstem Reading: Shirle ch 6 RGB and HSV Green(,,)

More information

CSE528 Computer Graphics: Theory, Algorithms, and Applications

CSE528 Computer Graphics: Theory, Algorithms, and Applications CSE528 Computer Graphics: Theor, Algorithms, and Applications Hong Qin State Universit of New York at Ston Brook (Ston Brook Universit) Ston Brook, New York 794--44 Tel: (63)632-845; Fa: (63)632-8334 qin@cs.sunsb.edu

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

Must first specify the type of projection desired. When use parallel projections? For technical drawings, etc. Specify the viewing parameters

Must first specify the type of projection desired. When use parallel projections? For technical drawings, etc. Specify the viewing parameters walters@buffalo.edu CSE 480/580 Lecture 4 Slide 3-D Viewing Continued Eamples of 3-D Viewing Must first specif the tpe of projection desired When use parallel projections? For technical drawings, etc.

More information

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

Image Warping : Computational Photography Alexei Efros, CMU, Fall Some slides from Steve Seitz Image Warping http://www.jeffre-martin.com Some slides from Steve Seitz 5-463: Computational Photograph Aleei Efros, CMU, Fall 2 Image Transformations image filtering: change range of image g() T(f())

More information

Image Warping. Some slides from Steve Seitz

Image Warping.   Some slides from Steve Seitz Image Warping http://www.jeffre-martin.com Some slides from Steve Seitz 5-463: Computational Photograph Aleei Efros, CMU, Fall 26 Image Warping image filtering: change range of image g() T(f()) f T f image

More information

Viewing. Cliff Lindsay, Ph.D. WPI

Viewing. Cliff Lindsay, Ph.D. WPI Viewing Cliff Lindsa, Ph.D. WPI Building Virtual Camera Pipeline l Used To View Virtual Scene l First Half of Rendering Pipeline Related To Camera l Takes Geometr From ApplicaHon To RasteriaHon Stages

More information

Transformations II. Week 2, Wed Jan 17

Transformations II. Week 2, Wed Jan 17 Universit of British Columbia CPSC 34 Computer Graphics Jan-Apr 27 Tamara Munzner Transformations II Week 2, Wed Jan 7 http://www.ugrad.cs.ubc.ca/~cs34/vjan27 Readings for Jan 5-22 FCG Chap 6 Transformation

More information

Last Time. Correct Transparent Shadow. Does Ray Tracing Simulate Physics? Does Ray Tracing Simulate Physics? Refraction and the Lifeguard Problem

Last Time. Correct Transparent Shadow. Does Ray Tracing Simulate Physics? Does Ray Tracing Simulate Physics? Refraction and the Lifeguard Problem Graphics Pipeline: Projective Last Time Shadows cast ra to light stop after first intersection Reflection & Refraction compute direction of recursive ra Recursive Ra Tracing maimum number of bounces OR

More information

Systems of Linear Equations

Systems of Linear Equations Sstems of Linear Equations Gaussian Elimination Tpes of Solutions A linear equation is an equation that can be written in the form: a a a n n b The coefficients a i and the constant b can be real or comple

More information

Scene Graphs & Modeling Transformations COS 426

Scene Graphs & Modeling Transformations COS 426 Scene Graphs & Modeling Transformations COS 426 3D Object Representations Points Range image Point cloud Surfaces Polgonal mesh Subdivision Parametric Implicit Solids Voels BSP tree CSG Sweep High-level

More information

Modeling Transformations

Modeling Transformations שיעור 3 גרפיקה ממוחשבת תשס"ח ב ליאור שפירא Modeling Transformations Heavil based on: Thomas Funkhouser Princeton Universit CS 426, Fall 2 Modeling Transformations Specif transformations for objects Allows

More information

To Do. Demo (Projection Tutorial) Motivation. What we ve seen so far. Outline. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 5: Viewing

To Do. Demo (Projection Tutorial) Motivation. What we ve seen so far. Outline. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 5: Viewing Foundations of Computer Graphics (Fall 0) CS 84, Lecture 5: Viewing http://inst.eecs.berkele.edu/~cs84 To Do Questions/concerns about assignment? Remember it is due Sep. Ask me or TAs re problems Motivation

More information

CS 428: Fall Introduction to. Viewing and projective transformations. Andrew Nealen, Rutgers, /23/2009 1

CS 428: Fall Introduction to. Viewing and projective transformations. Andrew Nealen, Rutgers, /23/2009 1 CS 428: Fall 29 Introduction to Computer Graphics Viewing and projective transformations Andrew Nealen, Rutgers, 29 9/23/29 Modeling and viewing transformations Canonical viewing volume Viewport transformation

More information

Computer Graphics. Geometric. Transformations. by Brian Wyvill University of Calgary. Lecture 2 Geometric. Transformations. Lecture 2 Geometric

Computer Graphics. Geometric. Transformations. by Brian Wyvill University of Calgary. Lecture 2 Geometric. Transformations. Lecture 2 Geometric Lecture 2 Geometric Transformations Computer Graphics Lecture 2 Geometric Transformations b Brian Wvill Universit of Calgar ENEL/CPSC. Lecture 2 Geometric Transformations Lecture 2 Geometric Transformations

More information

More on Transformations. COS 426, Spring 2019 Princeton University

More on Transformations. COS 426, Spring 2019 Princeton University More on Transformations COS 426, Spring 2019 Princeton Universit Agenda Grab-bag of topics related to transformations: General rotations! Euler angles! Rodrigues s rotation formula Maintaining camera transformations!

More information

The 3-D Graphics Rendering Pipeline

The 3-D Graphics Rendering Pipeline The 3-D Graphics Rendering Pipeline Modeling Trival Rejection Illumination Viewing Clipping Projection Almost ever discussion of 3-D graphics begins here Seldom are an two versions drawn the same wa Seldom

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

IMGD The Game Development Process: 3D Modeling and Transformations

IMGD The Game Development Process: 3D Modeling and Transformations IMGD - The Game Development Process: 3D Modeling and Transformations b Robert W. Lindeman (gogo@wpi.edu Kent Quirk (kent_quirk@cognito.com (with lots of input from Mark Clapool! Overview of 3D Modeling

More information

CS F-07 Objects in 2D 1

CS F-07 Objects in 2D 1 CS420-2010F-07 Objects in 2D 1 07-0: Representing Polgons We want to represent a simple polgon Triangle, rectangle, square, etc Assume for the moment our game onl uses these simple shapes No curves for

More information

Editing and Transformation

Editing and Transformation Lecture 5 Editing and Transformation Modeling Model can be produced b the combination of entities that have been edited. D: circle, arc, line, ellipse 3D: primitive bodies, etrusion and revolved of a profile

More information

521493S Computer Graphics Exercise 2 Solution (Chapters 4-5)

521493S Computer Graphics Exercise 2 Solution (Chapters 4-5) 5493S Computer Graphics Exercise Solution (Chapters 4-5). Given two nonparallel, three-dimensional vectors u and v, how can we form an orthogonal coordinate system in which u is one of the basis vectors?

More information

CS 335 Graphics and Multimedia. Geometric Warping

CS 335 Graphics and Multimedia. Geometric Warping CS 335 Graphics and Multimedia Geometric Warping Geometric Image Operations Eample transformations Straightforward methods and their problems The affine transformation Transformation algorithms: Forward

More information

Scientific Manual FEM-Design 16.0

Scientific Manual FEM-Design 16.0 1.4.6 Calculations considering diaphragms All of the available calculation in FEM-Design can be performed with diaphragms or without diaphragms if the diaphragms were defined in the model. B the different

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

3D Geometry and Camera Calibration

3D Geometry and Camera Calibration 3D Geometr and Camera Calibration 3D Coordinate Sstems Right-handed vs. left-handed 2D Coordinate Sstems ais up vs. ais down Origin at center vs. corner Will often write (u, v) for image coordinates v

More information

Modeling Transformations

Modeling Transformations Modeling Transformations Thomas Funkhouser Princeton Universit CS 426, Fall 2 Modeling Transformations Specif transformations for objects Allos definitions of objects in on coordinate sstems Allos use

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

Modeling Transformations

Modeling Transformations Transformations Transformations Specif transformations for objects o Allos definitions of objects in on coordinate sstems o Allos use of object definition multiple times in a scene Adam Finkelstein Princeton

More information

Motivation. What we ve seen so far. Demo (Projection Tutorial) Outline. Projections. Foundations of Computer Graphics

Motivation. What we ve seen so far. Demo (Projection Tutorial) Outline. Projections. Foundations of Computer Graphics Foundations of Computer Graphics Online Lecture 5: Viewing Orthographic Projection Ravi Ramamoorthi Motivation We have seen transforms (between coord sstems) But all that is in 3D We still need to make

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

Homogeneous Coordinates

Homogeneous Coordinates COMS W4172 3D Math 2 Steven Feiner Department of Computer Science Columbia Universit New York, NY 127 www.cs.columbia.edu/graphics/courses/csw4172 Februar 1, 218 1 Homogeneous Coordinates w X W Y X W Y

More information

3D graphics rendering pipeline (1) 3D graphics rendering pipeline (3) 3D graphics rendering pipeline (2) 8/29/11

3D graphics rendering pipeline (1) 3D graphics rendering pipeline (3) 3D graphics rendering pipeline (2) 8/29/11 3D graphics rendering pipeline (1) Geometr Rasteriation 3D Coordinates & Transformations Prof. Aaron Lanterman (Based on slides b Prof. Hsien-Hsin Sean Lee) School of Electrical and Computer Engineering

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

Image Metamorphosis By Affine Transformations

Image Metamorphosis By Affine Transformations Image Metamorphosis B Affine Transformations Tim Mers and Peter Spiegel December 16, 2005 Abstract Among the man was to manipulate an image is a technique known as morphing. Image morphing is a special

More information

To Do. Motivation. Demo (Projection Tutorial) What we ve seen so far. Computer Graphics. Summary: The Whole Viewing Pipeline

To Do. Motivation. Demo (Projection Tutorial) What we ve seen so far. Computer Graphics. Summary: The Whole Viewing Pipeline Computer Graphics CSE 67 [Win 9], Lecture 5: Viewing Ravi Ramamoorthi http://viscomp.ucsd.edu/classes/cse67/wi9 To Do Questions/concerns about assignment? Remember it is due tomorrow! (Jan 6). Ask me or

More information

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

Uses of Transformations. 2D transformations Homogeneous coordinates. Transformations. Transformations. Transformations. Transformations and matrices Uses of Transformations 2D transformations Homogeneous coordinates odeling: position and resie parts of a comple model; Viewing: define and position the virtual camera Animation: define how objects move/change

More information

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

Computer Graphics. 2D transformations. Transforma3ons in computer graphics. Overview. Basic classes of geometric transforma3ons Transforma3ons in computer graphics omputer Graphics Transforma3ons leksandra Piurica Goal: introduce methodolog to hange coordinate sstem Move and deform objects Principle: transforma3ons are applied

More information

Realtime 3D Computer Graphics & Virtual Reality. Viewing

Realtime 3D Computer Graphics & Virtual Reality. Viewing Realtime 3D Computer Graphics & Virtual Realit Viewing Transformation Pol. Per Verte Pipeline CPU DL Piel Teture Raster Frag FB v e r t e object ee clip normalied device Modelview Matri Projection Matri

More information

3D Coordinates & Transformations

3D Coordinates & Transformations 3D Coordinates & Transformations Prof. Aaron Lanterman (Based on slides b Prof. Hsien-Hsin Sean Lee) School of Electrical and Computer Engineering Georgia Institute of Technolog 3D graphics rendering pipeline

More information

Image Warping. Some slides from Steve Seitz

Image Warping.   Some slides from Steve Seitz Image Warping http://www.jeffre-martin.com Some slides from Steve Seitz 5-463: Computational Photograph Aleei Efros, CMU, Spring 2 Image Transformations image filtering: change range of image g() = T(f())

More information

CS 450: COMPUTER GRAPHICS 2D TRANSFORMATIONS SPRING 2016 DR. MICHAEL J. REALE

CS 450: COMPUTER GRAPHICS 2D TRANSFORMATIONS SPRING 2016 DR. MICHAEL J. REALE CS 45: COMUTER GRAHICS 2D TRANSFORMATIONS SRING 26 DR. MICHAEL J. REALE INTRODUCTION Now that we hae some linear algebra under our resectie belts, we can start ug it in grahics! So far, for each rimitie,

More information

Section 9.3: Functions and their Graphs

Section 9.3: Functions and their Graphs Section 9.: Functions and their Graphs Graphs provide a wa of displaing, interpreting, and analzing data in a visual format. In man problems, we will consider two variables. Therefore, we will need to

More information

Transformations of Functions. 1. Shifting, reflecting, and stretching graphs Symmetry of functions and equations

Transformations of Functions. 1. Shifting, reflecting, and stretching graphs Symmetry of functions and equations Chapter Transformations of Functions TOPICS.5.. Shifting, reflecting, and stretching graphs Smmetr of functions and equations TOPIC Horizontal Shifting/ Translation Horizontal Shifting/ Translation Shifting,

More information

Image Warping (Szeliski Sec 2.1.2)

Image Warping (Szeliski Sec 2.1.2) Image Warping (Szeliski Sec 2..2) http://www.jeffre-martin.com CS94: Image Manipulation & Computational Photograph Aleei Efros, UC Berkele, Fall 7 Some slides from Steve Seitz Image Transformations image

More information

Math 26: Fall (part 1) The Unit Circle: Cosine and Sine (Evaluating Cosine and Sine, and The Pythagorean Identity)

Math 26: Fall (part 1) The Unit Circle: Cosine and Sine (Evaluating Cosine and Sine, and The Pythagorean Identity) Math : Fall 0 0. (part ) The Unit Circle: Cosine and Sine (Evaluating Cosine and Sine, and The Pthagorean Identit) Cosine and Sine Angle θ standard position, P denotes point where the terminal side of

More information

Lines and Their Slopes

Lines and Their Slopes 8.2 Lines and Their Slopes Linear Equations in Two Variables In the previous chapter we studied linear equations in a single variable. The solution of such an equation is a real number. A linear equation

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 1 Computer Viewing

More information

MEM380 Applied Autonomous Robots Winter Robot Kinematics

MEM380 Applied Autonomous Robots Winter Robot Kinematics MEM38 Applied Autonomous obots Winter obot Kinematics Coordinate Transformations Motivation Ultimatel, we are interested in the motion of the robot with respect to a global or inertial navigation frame

More information

Name: [20 points] Consider the following OpenGL commands:

Name: [20 points] Consider the following OpenGL commands: Name: 2 1. [20 points] Consider the following OpenGL commands: glmatrimode(gl MODELVIEW); glloadidentit(); glrotatef( 90.0, 0.0, 1.0, 0.0 ); gltranslatef( 2.0, 0.0, 0.0 ); glscalef( 2.0, 1.0, 1.0 ); What

More information

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

2D Transformations. Why Transformations. Translation 4/17/2009 4/7/9 D Tansfomations Wh Tansfomations Coodinate sstem tansfomations Placing objects in the wold Move/animate the camea fo navigation Dawing hieachical chaactes Animation Tanslation + d 5,4 + d,3 d 4,

More information

Perspective Projection Transformation

Perspective Projection Transformation Perspective Projection Transformation Where does a point of a scene appear in an image?? p p Transformation in 3 steps:. scene coordinates => camera coordinates. projection of camera coordinates into image

More information

Transformations III. Week 2, Fri Jan 19

Transformations III. Week 2, Fri Jan 19 Universit of British Columbia CPSC 34 Computer Graphics Jan-Apr 2007 Tamara Munzner Transformations III Week 2, Fri Jan 9 http://www.ugrad.cs.ubc.ca/~cs34/vjan2007 Readings for Jan 5-22 FCG Chap 6 Transformation

More information

CS 4731/543: Computer Graphics Lecture 5 (Part I): Projection. Emmanuel Agu

CS 4731/543: Computer Graphics Lecture 5 (Part I): Projection. Emmanuel Agu CS 4731/543: Computer Graphics Lecture 5 (Part I): Projection Emmanuel Agu 3D Viewing and View Volume Recall: 3D viewing set up Projection Transformation View volume can have different shapes (different

More information

Computer Graphics. 2D Transforma5ons. Review Vertex Transforma5ons 2/3/15. adjust the zoom. posi+on the camera. posi+on the model

Computer Graphics. 2D Transforma5ons. Review Vertex Transforma5ons 2/3/15. adjust the zoom. posi+on the camera. posi+on the model /3/5 Computer Graphics D Transforma5ons Review Verte Transforma5ons posi+on the model posi+on the camera adjust the zoom verte shader input verte shader output, transformed /3/5 From Object to World Space

More information

Think About. Unit 5 Lesson 3. Investigation. This Situation. Name: a Where do you think the origin of a coordinate system was placed in creating this

Think About. Unit 5 Lesson 3. Investigation. This Situation. Name: a Where do you think the origin of a coordinate system was placed in creating this Think About This Situation Unit 5 Lesson 3 Investigation 1 Name: Eamine how the sequence of images changes from frame to frame. a Where do ou think the origin of a coordinate sstem was placed in creating

More information

CS770/870 Spring 2017 Transformations

CS770/870 Spring 2017 Transformations CS770/870 Spring 2017 Transformations Coordinate sstems 2D Transformations Homogeneous coordinates Matrices, vectors, points 01/29/2017 1 Coordinate Sstems Coordinate sstems used in graphics Screen coordinates:

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

NATIONAL UNIVERSITY OF SINGAPORE. (Semester I: 1999/2000) EE4304/ME ROBOTICS. October/November Time Allowed: 2 Hours

NATIONAL UNIVERSITY OF SINGAPORE. (Semester I: 1999/2000) EE4304/ME ROBOTICS. October/November Time Allowed: 2 Hours NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION FOR THE DEGREE OF B.ENG. (Semester I: 1999/000) EE4304/ME445 - ROBOTICS October/November 1999 - Time Allowed: Hours INSTRUCTIONS TO CANDIDATES: 1. This paper

More information

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

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

More information

MAN-522: COMPUTER VISION SET-2 Projections and Camera Calibration

MAN-522: COMPUTER VISION SET-2 Projections and Camera Calibration MAN-522: COMPUTER VISION SET-2 Projections and Camera Calibration Image formation How are objects in the world captured in an image? Phsical parameters of image formation Geometric Tpe of projection Camera

More information

Robot Geometry and Kinematics

Robot Geometry and Kinematics CIS 68/MEAM 50 Robot Geometr and Kinematics CIS 68/MEAM 50 Outline Industrial (conventional) robot arms Basic definitions for understanding -D geometr, kinematics Eamples Classification b geometr Relationship

More information

Note 2: Transformation (modeling and viewing)

Note 2: Transformation (modeling and viewing) Note : Tranformation (modeling and viewing Reading: tetbook chapter 4 (geometric tranformation and chapter 5 (viewing.. Introduction (model tranformation modeling coordinate modeling tranformation world

More information

LESSON 3.1 INTRODUCTION TO GRAPHING

LESSON 3.1 INTRODUCTION TO GRAPHING LESSON 3.1 INTRODUCTION TO GRAPHING LESSON 3.1 INTRODUCTION TO GRAPHING 137 OVERVIEW Here s what ou ll learn in this lesson: Plotting Points a. The -plane b. The -ais and -ais c. The origin d. Ordered

More information

Rotate. A bicycle wheel can rotate clockwise or counterclockwise. ACTIVITY: Three Basic Ways to Move Things

Rotate. A bicycle wheel can rotate clockwise or counterclockwise. ACTIVITY: Three Basic Ways to Move Things . Rotations object in a plane? What are the three basic was to move an Rotate A biccle wheel can rotate clockwise or counterclockwise. 0 0 0 9 9 9 8 8 8 7 6 7 6 7 6 ACTIVITY: Three Basic Was to Move Things

More information

To Do. Course Outline. Course Outline. Goals. Motivation. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 3: Transformations 1

To Do. Course Outline. Course Outline. Goals. Motivation. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 3: Transformations 1 Fondations of Compter Graphics (Fall 212) CS 184, Lectre 3: Transformations 1 http://inst.eecs.berkele.ed/~cs184 Sbmit HW b To Do Start looking at HW 1 (simple, bt need to think) Ais-angle rotation and

More information

Reteaching Golden Ratio

Reteaching Golden Ratio Name Date Class Golden Ratio INV 11 You have investigated fractals. Now ou will investigate the golden ratio. The Golden Ratio in Line Segments The golden ratio is the irrational number 1 5. c On the line

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

Notes. University of British Columbia

Notes. University of British Columbia Notes Drop-bo is no. 14 You can hand in our assignments Assignment 0 due Fri. 4pm Assignment 1 is out Office hours toda 16:00 17:00, in lab or in reading room Uniersit of Uniersit of Chapter 4 - Reminder

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