CAP4730: Computational Structures in Computer Graphics

Slides:



Advertisements
Similar presentations
COMPUTER GRAPHICS 2D TRANSFORMATIONS.
Advertisements

25 May May May 2015Week 5-2D Transformations1 2D Transformations By: KanwarjeetSingh.
2D TRANSFORMATIONS.
CMPE 466 COMPUTER GRAPHICS
1 CSCE 441 Computer Graphics: 2D Transformations Jinxiang Chai.
1 Geometrical Transformation Tong-Yee Lee. 2 Modeling Transform Specify transformation for objects Allow definitions of objects in own coordinate systems.
Rotations and Translations. Representing a Point 3D A tri-dimensional point A is a reference coordinate system here.
Transformations CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Graphics Programming Graphics Programming: Transformations.
2D Transformations x y x y x y. 2D Transformation Given a 2D object, transformation is to change the object’s Position (translation) Size (scaling) Orientation.
2D Transformations Unit - 3. Why Transformations? In graphics, once we have an object described, transformations are used to move that object, scale it.
2D Transformations. World Coordinates Translate Rotate Scale Viewport Transforms Hierarchical Model Transforms Putting it all together.
CS 450: Computer Graphics 2D TRANSFORMATIONS
1 Computer Graphics Week7 -2D Rotation. 3-Rotation A shape can be rotated about any of the three axes. A rotation about the z-axis will actually rotate.
Mathematical Fundamentals
Rotations and Translations
Theory of Machines Lecture 4 Position Analysis.
CS 480/680 Computer Graphics Representation Dr. Frederick C Harris, Jr. Fall 2012.
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.
2D Transformation of Graphics
Lecture Notes: Computer Graphics.
Geometric Transforms Changing coordinate systems.
Homogeneous Coordinates (Projective Space) Let be a point in Euclidean space Change to homogeneous coordinates: Defined up to scale: Can go back to non-homogeneous.
Computer Graphics World, View and Projection Matrices CO2409 Computer Graphics Week 8.
Part7: Geometric Transformations
Rotations and Translations 1. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined as: A unit.
Transformations Jehee Lee Seoul National University.
Geometric Transformations
CS 376 Introduction to Computer Graphics 02 / 16 / 2007 Instructor: Michael Eckmann.
Transformations Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
CAP4730: Computational Structures in Computer Graphics 3D Transformations.
Computer Graphics 2D Transformations. 2 of 74 Contents In today’s lecture we’ll cover the following: –Why transformations –Transformations Translation.
1 Computer Graphics Week9 -3D Geometric Transformation.
Computer Graphics 3D Transformations. Translation.
Two-Dimensional Geometric Transformations ch5. 참조 Subjects : Basic Transformations Homogeneous Coordinates Composite Transformations Other Transformations.
Geometric Transformations
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
2D Geometric Transformation Translation A translation is applied to an object by repositioning it along a straight-line path from one coordinate location.
Geometric Transformations UBI 516 Advanced Computer Graphics Aydın Öztürk
Fall 2004CS-321 Dr. Mark L. Hornick 1 2-D Transformations World Coordinates Local/Modelling Coordinates x y Object descriptions Often defined in model.
CS552: Computer Graphics Lecture 4: 2D Graphics. Recap 2D Graphics Coordinate systems 2D Transformations o Translation o Scaling o Rotation Combining.
Computer Graphics Matrices
II-1 Transformations Transformations are needed to: –Position objects defined relative to the origin –Build scenes based on hierarchies –Project objects.
Learning Objectives Affine transformations Affine transformations Translation Translation Rotation Rotation Scaling Scaling Reflection Reflection Shear.
Honors Geometry.  We learned how to set up a polygon / vertex matrix  We learned how to add matrices  We learned how to multiply matrices.
Computer Graphics I, Fall 2010 Transformations.
1 Teaching Innovation - Entrepreneurial - Global The Centre for Technology enabled Teaching & Learning, N Y S S, India DTEL DTEL (Department for Technology.
CS 325 Introduction to Computer Graphics 02 / 19 / 2010 Instructor: Michael Eckmann.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Transformations Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Computer Graphics Lecture 11 2D Transformations I Taqdees A. Siddiqi
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
Computer Graphic 2 D Transformation.
CSCE 441 Computer Graphics: 2D Transformations
Transformations. Transformations Introduce standard transformations ◦ Rotation ◦ Translation ◦ Scaling ◦ Shear Derive homogeneous coordinate transformation.
Robotic Arms and Matrices By Chris Wong and Chris Marino.
Objectives Introduce standard transformations Introduce standard transformations Derive homogeneous coordinate transformation matrices Derive homogeneous.
Lecture 10 Geometric Transformations In 3D(Three- Dimensional)
Math Fundamentals Maths revisit.
Spatcial Description & Transformation
2D Transformations By: KanwarjeetSingh
Computer Graphics CC416 Week 15 3D Graphics.
Computer Graphics 3D Transformations
2D Transformations y y x x y x.
COMP 175: Computer Graphics February 9, 2016
Rigid Body Transformations
2D/3D Transformations User Interfaces.
Rigid Body Transformations
Presentation transcript:

CAP4730: Computational Structures in Computer Graphics 2D Transformations

2D Transformations World Coordinates Translate Rotate Scale Viewport Transforms Putting it all together

Transformations Rigid Body Transformations - transformations that do not change the object. Translate If you translate a rectangle, it is still a rectangle Scale If you scale a rectangle, it is still a rectangle Rotate If you rotate a rectangle, it is still a rectangle

Vertices We have always represented vertices as (x,y) An alternate method is: Example:

Matrix * Vector

Matrix * Matrix Does A*B = B*A? What does the identity do?

Practice

Translation Translation - repositioning an object along a straight-line path (the translation distances) from one coordinate location to another. (x’,y’) (tx,ty) (x,y)

Translation Given: We want: Matrix form:

Translation Examples P=(2,4), T=(-1,14), P’=(?,?)

Which one is it? (x’,y’) (tx,ty) (tx,ty) (x,y) (x,y)

Recall A point is a position specified with coordinate values in some reference frame. We usually label a point in this reference point as the origin. All points in the reference frame are given with respect to the origin.

Applying to Triangles (tx,ty)

What do we have here? You know how to:

Scale Scale - Alters the size of an object. Scales about a fixed point (x’,y’) (x,y)

Scale Given: We want: Matrix form:

Non-Uniform/Differential Scalin’ (x’,y’) (x,y) S=(1,2)

Rotation Rotation - repositions an object along a circular path. Rotation requires an  and a pivot point

Rotation

Example P=(4,4) =45 degrees

What is the difference? Revisited V(-0.6,0) V(0,-0.6) V(0.6,0.6) Translate (1.2,0.3) V(0,0.6) V(0.3,0.9) V(0,1.2) Translate (1.2,0.3) V(0.6,0.3) V(1.2,-0.3) V(1.8,0.9) V(0,0.6) V(0.3,0.9) V(0,1.2)

Rotations V(-0.6,0) V(0,-0.6) V(0.6,0.6) Rotate -30 degrees

Combining Transformations Q: How do we specify each transformation?

Specifying 2D Transformations Translation T(tx, ty) Translation distances Scale S(sx,sy) Scale factors Rotation R() Rotation angle

Combining Transformations Using translate, rotation, and scale, how do we get:

Combining Transformations Note there are two ways to combine rotation and translation. Why?

Let’s look at the equations

Combining them We must do each step in turn. First we rotate the points, then we translate, etc. Since we can represent the transformations by matrices, why don’t we just combine them?

2x2 -> 3x3 Matrices We can combine transformations by expanding from 2x2 to 3x3 matrices.

Homogenous Coordinates We need to do something to the vertices By increasing the dimensionality of the problem we can transform the addition component of Translation into multiplication.

Homogenous Coordinates Homogenous Coordinates - term used in mathematics to refer to the effect of this representation on Cartesian equations. Converting a pt(x,y) and f(x,y)=0 -> (xh,yh,h) then in homogenous equations mean (v*xh,v*yh,v*h) can be factored out. What you should get: By expressing the transformations with homogenous equations and coordinates, all transformations can be expressed as matrix multiplications.

Final Transformations - Compare Equations

Combining Transformations

How would we get:

How would we get:

Coordinate Systems Object Coordinates World Coordinates Eye Coordinates

Object Coordinates

World Coordinates

Screen Coordinates

Coordinate Hierarchy

Let’s reexamine assignment 2b

Transformation Hierarchies For example:

Transformation Hierarchies Let’s examine:

Transformation Hierarchies What is a better way?

Transformation Hierarchies What is a better way?

Transformation Hierarchies We can have transformations be in relation to each other

More Complex Models