Lecture 5 2D Transformation

Similar documents
Transforms. COMP 575/770 Spring 2013

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

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

2D Object Definition (1/3)

Vector Algebra Transformations. Lecture 4

Graphics and Interaction Transformation geometry and homogeneous coordinates

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

2D/3D Geometric Transformations and Scene Graphs

Graphics Pipeline 2D Geometric Transformations

So we have been talking about 3D viewing, the transformations pertaining to 3D viewing. Today we will continue on it. (Refer Slide Time: 1:15)

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

Geometric Transformations

Computer Science 336 Fall 2017 Homework 2

Lecture 4: Transforms. Computer Graphics CMU /15-662, Fall 2016

Transformations. Examples of transformations: shear. scaling

2D and 3D Transformations AUI Course Denbigh Starkey

Matrix Transformations The position of the corners of this triangle are described by the vectors: 0 1 ] 0 1 ] Transformation:

Computer Graphics Hands-on

Reflection (M): Reflect simple plane figures in horizontal or vertical lines;

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

Computer Graphics: Geometric Transformations

6B Quiz Review Learning Targets ,

Part 3: 2D Transformation

Matrices. Chapter Matrix A Mathematical Definition Matrix Dimensions and Notation

6.837 LECTURE 7. Lecture 7 Outline Fall '01. Lecture Fall '01

CS230 : Computer Graphics Lecture 6: Viewing Transformations. Tamar Shinar Computer Science & Engineering UC Riverside

GEOMETRIC TRANSFORMATIONS AND VIEWING

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

CT5510: Computer Graphics. Transformation BOCHANG MOON

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

Computer Graphics and Image Processing

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

UNIT 2 2D TRANSFORMATIONS

2D Geometric Transformations and Matrices

Computer Graphics Geometric Transformations

MET71 COMPUTER AIDED DESIGN

Lecture 9: Transformations. CITS3003 Graphics & Animation

XPM 2D Transformations Week 2, Lecture 3

Linear transformations Affine transformations Transformations in 3D. Graphics 2009/2010, period 1. Lecture 5: linear and affine transformations

Translations. Geometric Image Transformations. Two-Dimensional Geometric Transforms. Groups and Composition

XPM 2D Transformations Week 2, Lecture 3

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

CS1114 Assignment 5, Part 1

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

CSE528 Computer Graphics: Theory, Algorithms, and Applications

On Your Own. ). Another way is to multiply the. ), and the image. Applications. Unit 3 _ _

Solution Notes. COMP 151: Terms Test

Answers to practice questions for Midterm 1

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

Advanced Computer Graphics Transformations. Matthias Teschner

Aspects of Geometry. Finite models of the projective plane and coordinates

CSE328 Fundamentals of Computer Graphics

Overview. By end of the week:

Computer Graphics 7: Viewing in 3-D

2D Transforms. Lecture 4 CISC440/640 Spring Department of Computer and Information Science

Computer Graphics: Viewing in 3-D. Course Website:

CS4620/5620. Professor: Kavita Bala. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner)

COMP 558 lecture 19 Nov. 17, 2010

MODULE - 7. Subject: Computer Science. Module: Other 2D Transformations. Module No: CS/CGV/7

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

TRANSFORMATIONS. The original figure is called the pre-image; the new (copied) picture is called the image of the transformation.

COMP30019 Graphics and Interaction Three-dimensional transformation geometry and perspective

Strategy. Using Strategy 1

Transforms 1 Christian Miller CS Fall 2011

MATRIX REVIEW PROBLEMS: Our matrix test will be on Friday May 23rd. Here are some problems to help you review.

Year 8 Set 2 : Unit 1 : Number 1

Kinematics of Machines Prof. A. K. Mallik Department of Mechanical Engineering Indian Institute of Technology, Kanpur. Module - 3 Lecture - 1

CS 130 Final. Fall 2015

Math 9: Chapter Review Assignment

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

COMP3421. Vector geometry, Clipping

Homework 5: Transformations in geometry

E0005E - Industrial Image Analysis

8. The triangle is rotated around point D to create a new triangle. This looks like a rigid transformation.

CSE152a Computer Vision Assignment 1 WI14 Instructor: Prof. David Kriegman. Revision 0

CSE 167: Introduction to Computer Graphics Lecture #11: Bezier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

Today s Topics. 3. Transformations in 2D. 4. Coordinate-free geometry. 5. 3D Objects (curves & surfaces) 6. Transformations in 3D

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

Camera Calibration. Schedule. Jesus J Caban. Note: You have until next Monday to let me know. ! Today:! Camera calibration

12 m. 30 m. The Volume of a sphere is 36 cubic units. Find the length of the radius.

Cs602-computer graphics MCQS MIDTERM EXAMINATION SOLVED BY ~ LIBRIANSMINE ~

Computer Graphics Hands-on

Perspective projection and Transformations

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

CS 4204 Computer Graphics

Affine Transformations. Transforming shape models Combining affine transformations Scene graphs, interactor trees Hit tests on transformed shapes

Section 7.2 Volume: The Disk Method

Introduction to Transformations. In Geometry

Computer Vision I Name : CSE 252A, Fall 2012 Student ID : David Kriegman Assignment #1. (Due date: 10/23/2012) x P. = z

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

Viewing with Computers (OpenGL)

Section III: TRANSFORMATIONS

GEOMETRIC OBJECTS AND TRANSFORMATIONS I

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

Properties of a Circle Diagram Source:

Today. Parity. General Polygons? Non-Zero Winding Rule. Winding Numbers. CS559 Lecture 11 Polygons, Transformations

2D Image Transforms Computer Vision (Kris Kitani) Carnegie Mellon University

Image Analysis. Rasmus R. Paulsen DTU Compute. DTU Compute

CS 130 Exam I. Fall 2015

Chapter 2 - Basic Mathematics for 3D Computer Graphics

Transcription:

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 or changes a shape (line, shape, drawing etc.) They are best understood graphically first. There are several basic ways you can change a shape: Translation (moving it somewhere else). Rotation (turning it round). Scaling (making it bigger or smaller). Shearing reflection

Transformation Types of Transformation Geometric transformation: Object transformed related to their coordinate system or background. Coordinate transformation: coordinate system is transformed instead of object. classes of transformation Rigid body: Preserves distance and angle ( translation and rotation) Conformal: Preserves angles. (translation, rotation and uniform scaling Affine: Preserves parallelism, means lines remains lines. Example- translation, rotation, scaling, shear and reflection

Translation Essentially, we want to move the shape dx pixels along the x-axis and dy pixels up the y-axis. In fact all this means is moving each constituent point by dx and dy. To move a point in this manner, simply add the values of dx and dy to its existing coordinates. Example 15 shows what a translate() method of the Point2D class might look like.

Rotation ( about the origin) To rotate any shape about the origin requires rotating each of its individual points. To work out how this is done, consider the coordinates of a point before and after the rotation: Both points will lie on the perimeter of a circle of radius r with its center on the origin.

Scaling Scaling a shape simply means making a it bigger or smaller. We can specify how much bigger or small be means of a scale factor - to double the size of an object we use a scale factor of 2, to half the size of an object we use a scale factor of 0.5.

Scaling Again, scaling of a shape is achieved by applying an operation to the individual points that make up the shape. In this case, the distance of a point from the origin changes by the scale factor. Simply multiplying the coordinates by the scale factor gives the new values of the coordinates.

Scaling Note that the scaling can be different in different directions: i.e. the x scale factor can be different to the y scale factor. By doing this we can stretch or squeeze a shape: Simply multiplying the coordinates by the scale factor gives the new values of the coordinates.

Scaling

Scaling

Scaling

One useful consequence of using matrices is that transformations that are combinations of transformations (remember that a local rotation is equivalent to a translation followed by a rotation followed by a translation) can be represented by multiplying the matrices together. Unfortunately, with the current set a matrices, this won t work because Equation 32 & Equation 33 are multiplications, whilst Equation 34 is an addition.

We can get round this by effectively including a fiddle factor and converting the matrices to use homogenous coordinates. What this actually means is that the addition necessary to perform translation can be achieved by multiplication. To convert our scheme of representation to homogenous coordinates we add an extra row to all point matrices and fill the extra position with a 1.

We can get round this by effectively including a fiddle factor and converting the matrices to use homogenous coordinates. What this actually means is that the addition necessary to perform translation can be achieved by multiplication. To convert our scheme of representation to homogenous coordinates we add an extra row to all point matrices and fill the extra position with a 1.

Combination of transformations using matrices When two matrices that represent different transformations are multiplied together, the resulting matrix represents the combined transformation. This leads to one of the main advantages of the matrix representation method: that a single matrix can be used to store the transformation that results from performing a sequence a transformations. i.e. we can concatenate transformations. This has obvious efficiency implications: in the case of repetitively applying the a series of transformations, the computer will need to do fewer calculations if the concatenation is available. A good example of this is the need to repeatedly spin an object about its centre (rotation about the local origin).

Identity Transformation

Order of Transformation The order in which transformations are applied to a shape is important. e.g. performing a translation followed by a rotation, will give an entirely different drawing to a performing the rotation followed by the same translation.

Order of Transformation

Rotation around local origin

Rotation around local origin

Rotation around local origin

Composition and Decomposition of Transformations

Sheet

Sheet

Sheet

Sheet