Transformational Geometry CS418 Computer Graphics John C. Hart.

Slides:



Advertisements
Similar presentations
COMPUTER GRAPHICS 2D TRANSFORMATIONS.
Advertisements

Computer Graphics Lecture 4 Geometry & Transformations.
Geometric Transformations
Informationsteknologi Wednesday, November 7, 2007Computer Graphics - Class 51 Today’s class Geometric objects and transformations.
25 May May May 2015Week 5-2D Transformations1 2D Transformations By: KanwarjeetSingh.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Transformations Week 2,
Transformations II Week 2, Wed Jan 17
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Transformations II Week.
HCI 530 : Seminar (HCI) Damian Schofield. HCI 530: Seminar (HCI) Transforms –Two Dimensional –Three Dimensional The Graphics Pipeline.
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2006 Some slides from Steve Seitz
CS 4731: Computer Graphics Lecture 7: Introduction to Transforms, 2D transforms Emmanuel Agu.
1 CSCE 441 Computer Graphics: 2D Transformations Jinxiang Chai.
Viewing Transformations CS5600 Computer Graphics by Rich Riesenfeld 5 March 2002 Lecture Set 11.
©College of Computer and Information Science, Northeastern UniversityJune 26, CS U540 Computer Graphics Prof. Harriet Fell Spring 2009 Lecture 11.
CS 4731: Computer Graphics Lecture 8: 3D Affine transforms Emmanuel Agu.
Graphics Programming Graphics Programming: Transformations.
CHAPTER 7 Viewing and Transformations © 2008 Cengage Learning EMEA.
2D transformations and homogeneous coordinates Dr Nicolas Holzschuch University of Cape Town Modified.
2D Transformations Unit - 3. Why Transformations? In graphics, once we have an object described, transformations are used to move that object, scale it.
CAP4730: Computational Structures in Computer Graphics
CS 450: Computer Graphics 2D TRANSFORMATIONS
Introduction to 3D Graphics Lecture 3: General Camera Model Anthony Steed University College London.
Transformations Aaron Bloomfield CS 445: Introduction to Graphics
Geometric Transformation. So far…. We have been discussing the basic elements of geometric programming. We have discussed points, vectors and their operations.
CS 480/680 Computer Graphics Transformations Dr. Frederick C Harris, Jr.
Computer Graphics World, View and Projection Matrices CO2409 Computer Graphics Week 8.
Dx = 2 dy = 3 Y X D Translation A translation is applied to an object by repositioning it along a straight-line path.
Part7: Geometric Transformations
CS-378: Game Technology Lecture #2.1: Projection Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney, Zoran Popovic, Jessica.
1 CS 430/536 Computer Graphics I 3D Transformations World Window to Viewport Transformation Week 2, Lecture 4 David Breen, William Regli and Maxim Peysakhov.
CAP4730: Computational Structures in Computer Graphics 3D Transformations.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
The Rendering Pipeline CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
1 Computer Graphics Week9 -3D Geometric Transformation.
16/5/ :47 UML Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function.
Viewing CS418 Computer Graphics John C. Hart. Graphics Pipeline Homogeneous Divide Model Coords Model Xform World Coords Viewing Xform Still Clip Coords.
CS 325 Introduction to Computer Graphics 02 / 26 / 2010 Instructor: Michael Eckmann.
OpenGL The Viewing Pipeline: Definition: a series of operations that are applied to the OpenGL matrices, in order to create a 2D representation from 3D.
CS418 Computer Graphics John C. Hart
Basic Perspective Projection Watt Section 5.2, some typos Define a focal distance, d, and shift the origin to be at that distance (note d is negative)
Geometric Transformations
Animation CS418 Computer Graphics John C. Hart.
2D Geometric Transformation Translation A translation is applied to an object by repositioning it along a straight-line path from one coordinate location.
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
3-D Transformational Geometry CS418 Computer Graphics John C. Hart.
Transformations: Projection CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
Affine Geometry.
Computer Graphics Matrices
Viewing and Projection
Ta: Ryan Freedman Sushma Kini Chi Zhou.  Pipeline  Clipping  Transformation, homogeneous coordinates  Lighting  Perspective  Viewing.
1 By Dr. HANY ELSALAMONY.  We have seen how to create models in the 3D world. We discussed transforms in lecture 3, and we have used some transformations.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Computer Graphics I, Fall 2010 Transformations.
Perspective CS418 Computer Graphics John C. Hart.
OpenGL CS418 Computer Graphics John C. Hart. OpenGL Based on GL (graphics library) by Silicon Graphics Inc. (SGI) Advantages: Runs on everything, including.
CSCE 441 Computer Graphics: 2D Transformations
Transformations. Transformations Introduce standard transformations ◦ Rotation ◦ Translation ◦ Scaling ◦ Shear Derive homogeneous coordinate transformation.
COMPUTER GRAPHICS AND LINEAR ALGEBRA AN INTRODUCTION.
Transformations University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2016 Tamara Munzner.
Modeling Transformations
CS418 Computer Graphics John C. Hart
2D Transformations By: KanwarjeetSingh
Computer Graphics CC416 Week 15 3D Graphics.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2016
Warm Up Find each product, if possible. 1. AB 2. BA.
Computer Graphics Transformations
Viewing Transformations
Geometrical Transformations
Transformations.
컴퓨터 그래픽스를 위한 기하학적 기초 (Line Geometry for Computer Graphics)
Presentation transcript:

Transformational Geometry CS418 Computer Graphics John C. Hart

Graphics Pipeline Homogeneous Divide Model Coords Model Xform World Coords Viewing Xform Still Clip Coords. Clipping Window Coordinates Window Coordinates Window to Viewport Window to Viewport Coordinates Viewport Coordinates Clip Coords. Viewing Coords Perspective Distortion

2-D Points Represents points and vertices as column vectors: (-1,-1) (1,1)

2-D Points Represents points and vertices as column vectors: Transform polygonal object by transforming its vertices (-1,-1) (1,1)

2-D Points Represents points and vertices as column vectors: Transform polygonal object by transforming its vertices Scale by matrix multiplication (-1,-1) (1,1)

2-D Points Represents points and vertices as column vectors: Transform polygonal object by transforming its vertices Scale by matrix multiplication Translation via vector sum (-1,-1) (1,1)

2-D Points Represents points and vertices as column vectors: Transform polygonal object by transforming its vertices Scale by matrix multiplication Translation via vector sum Order is important –Translate then scale –Scale then translate (-1,-1) (1,1)

Homogeneous Coordinates Translation by vector sum is cumbersome Add a extra coordinate –Called the homogeneous coordinate –For now, set to one Translation now expressed as a matrix Now we can compose scales and translations into a single matrix by matrix multiplication

Order Dependence (-1,-1)

Window-to-Viewport (-1,-1) (1,1) (0,0) (w-1,h-1) W2V First translate lower-left corner to (0,0) Then scale upper-right corner from (2,2) to (w-1,h-1) To get

2-D Rotation Pick a point (x,y)

2-D Rotation Pick a point (x,y) Assume polar coords x = r cos , y = r sin 

2-D Rotation Pick a point (x,y) Assume polar coords x = r cos , y = r sin  Rotate about origin by  x’ = r cos  + , y’ = r sin  + 

2-D Rotation Pick a point (x,y) Assume polar coords x = r cos , y = r sin  Rotate about origin by  x’ = r cos  + , y’ = r sin  +  Recall trig. identities x’ = r (cos  cos  –sin  sin  ) y’ = r (sin  cos  +cos  sin  )

2-D Rotation Pick a point (x,y) Assume polar coords x = r cos , y = r sin  Rotate about origin by  x’ = r cos  + , y’ = r sin  +  Recall trig. identities x’ = r (cos  cos  –sin  sin  ) y’ = r (sin  cos  +cos  sin  ) Rearrange terms x’ = cos  (r cos  ) – sin  (r sin  ) y’ = (r cos  ) sin  + (r sin  ) cos 

2-D Rotation x’ = cos  (r cos  ) – sin  (r sin  ) y’ = (r cos  ) sin  + (r sin  ) cos 

2-D Rotation x’ = cos  (r cos  ) – sin  (r sin  ) y’ = (r cos  ) sin  + (r sin  ) cos  x x y y

Squash & Stretch From: John Lasseter: “Principles of Traditional Animation Applied to 3-D Computer Animation” Proc. SIGGRAPH 87

Luxo Jr.

Squash Scale one coordinate by matrix multiplication

Arbitrary Squash Squash in arbitrary direction –Rotate direction into x –Squash in x –Rotate back

Graphics Pipeline Homogeneous Divide Model Coords Model Xform World Coords Viewing Xform Still Clip Coords. Clipping Window Coordinates Window Coordinates Window to Viewport Window to Viewport Coordinates Viewport Coordinates Clip Coords. Viewing Coords Perspective Distortion Screen Vertices Model Vertices