Computer Graphics Hands-on

Similar documents
Computer Graphics Hands-on

Computer Graphics Hands-on

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

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

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

Vector Algebra Transformations. Lecture 4

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

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

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

Computer Graphics: Geometric Transformations

Unit 14: Transformations (Geometry) Date Topic Page

TRANSFORMATIONS AND CONGRUENCE

UNIT 2 2D TRANSFORMATIONS

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

Chapter 2 - Basic Mathematics for 3D Computer Graphics

Transforms. COMP 575/770 Spring 2013

Part 3: 2D Transformation

Matrices. Chapter Matrix A Mathematical Definition Matrix Dimensions and Notation

GEOMETRIC TRANSFORMATIONS AND VIEWING

CT5510: Computer Graphics. Transformation BOCHANG MOON

1.8 Composition of Transformations

COMP30019 Graphics and Interaction Three-dimensional transformation geometry and perspective

Computer Graphics. Geometric Transformations

Computer Graphics. Geometric Transformations

Section III: TRANSFORMATIONS

Geometric Transformations

2D TRANSFORMATIONS AND MATRICES

Institutionen för systemteknik

Computer Graphics with OpenGL ES (J. Han) Chapter IV Spaces and Transforms

Chapter 2: Transformations. Chapter 2 Transformations Page 1

2D and 3D Transformations AUI Course Denbigh Starkey

Lecture 5 2D Transformation

Hello, welcome to the video lecture series on Digital Image Processing. So in today's lecture

Therefore, after becoming familiar with the Matrix Method, you will be able to solve a system of two linear equations in four different ways.

Exercises for Chapter Three You know you've got to exercise your brain just like your muscles. Will Rogers ( )

Graphics and Interaction Transformation geometry and homogeneous coordinates

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

GEOMETRIC OBJECTS AND TRANSFORMATIONS I

6B Quiz Review Learning Targets ,

MatLab Project # 1 Due IN TUTORIAL Wednesday October 30

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

Junior Circle Meeting 9 Commutativity and Inverses. May 30, We are going to examine different ways to transform the square below:

2D/3D Geometric Transformations and Scene Graphs

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

AH Matrices.notebook November 28, 2016

Homework 5: Transformations in geometry

Perimeter and Area of Geometric Figures on the Coordinate Plane

CCM6+/7+ - Unit 13 - Page 1 UNIT 13. Transformations CCM6+/7+ Name: Math Teacher: Projected Test Date:

1.2 Adding Integers. Contents: Numbers on the Number Lines Adding Signed Numbers on the Number Line

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

Module 2 Test Study Guide. Type of Transformation (translation, reflection, rotation, or none-of-theabove). Be as specific as possible.

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

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

CHAPTER 2: More on Functions

Vector Calculus: Understanding the Cross Product

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

Homework #2 and #3 Due Friday, October 12 th and Friday, October 19 th

CS 4620 Midterm 1. Tuesday 22 October minutes

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

MATHEMATICS FOR ENGINEERING TUTORIAL 5 COORDINATE SYSTEMS

CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES

MAT 003 Brian Killough s Instructor Notes Saint Leo University

UNIT 2. Translation/ Scaling/ Rotation. Unit-02/Lecture-01

Homework 5: Transformations in geometry

Camera Model and Calibration

Transformations Geometry

Monday, 12 November 12. Matrices

2-9 Operations with Complex Numbers

Interesting Application. Linear Algebra

Maths for Signals and Systems Linear Algebra in Engineering. Some problems by Gilbert Strang

Unit 5: Motion Geometry

What and Why Transformations?

Lecture 9: Transformations. CITS3003 Graphics & Animation

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

Representing 2D Transformations as Matrices

Chapel Hill Math Circle: Symmetry and Fractals

Transforms 1 Christian Miller CS Fall 2011

Game Engineering CS S-05 Linear Transforms

Mathematics and Symmetry: A Bridge to Understanding

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

Transforming Objects in Inkscape Transform Menu. Move

Transformations. Working backwards is performing the inverse operation. + - and x 3. Given coordinate rule

XPM 2D Transformations Week 2, Lecture 3

Unit 1, Lesson 1: Moving in the Plane

Geometry. 4.4 Congruence and Transformations

Geometry. 4.4 Congruence and Transformations

HIERARCHICAL TRANSFORMATIONS A Practical Introduction

Problem A. Interactive Smiley Face

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

Graphics Pipeline 2D Geometric Transformations

CS354 Computer Graphics Rotations and Quaternions

4. Two Dimensional Transformations

Linear and Affine Transformations Coordinate Systems

Transformation. Jane Li Assistant Professor Mechanical Engineering & Robotics Engineering

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

Unit 5: Transformations in the Coordinate Plane

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

XPM 2D Transformations Week 2, Lecture 3

CS251 Spring 2014 Lecture 7

Introduction to Homogeneous coordinates

Transcription:

Computer Graphics Hands-on Two-Dimensional Transformations Objectives Visualize the fundamental 2D geometric operations translation, rotation about the origin, and scale about the origin Experimentally and mathematically discover transformations that do and do not commute Learn how to compose transformations Discover how fixed point rotations and scales can be achieved by combining the fundamental operations Background Fundamental 2D geometric transformations: translation, rotation about the origin, scale about the origin, as well as their associated 3x3 transformation matrices. Software Tool Applet posted online http://www.csc.villanova.edu/~mdamian/graphics/applets/transformations2d.html Courtesy of Dr. Robin Flatland, Siena College. Activities Start the Transformations2D software tool. The buttons in the top right part of the window allow you to apply different transformations to the yellow smiley face. The buttons in the lower right allow you to step through the activities. The number of the current activity is displayed at the bottom. When you complete an activity, you will need to press the Next Activity button to advance. Some activities will display a green smiley face in addition to the yellow one. The goal of these activities is to transform the yellow face so that it has the same shape and position as the green one. We ll begin with three easy warm-up activities to get comfortable with the controls and then move on to some more challenging activities. As you develop solutions to the posed problems, be sure to test your solutions using the tool to see if the results are what you are expecting.

Part 1: Warm-up Activities Activity 0: What transformation could you apply to the yellow smiley face to make it look like the green smiley face? Activity 1: Click on the Next Activity button to advance to Activity 1. What transformation could you apply to the yellow smiley face so that it is upside down? 2

Activity 2: Click on the Next Activity button to advance to Activity 2. What transformation could you apply to the yellow smiley face to make it look like the green smiley face? Below, give the 3x3 scale matrix (in homogeneous coordinates) that was applied to the points to make the yellow smiley face look like the green face. Reset activity 2 using the Reset Activity button. Before the scale operation is applied, notice that the top right tip of the yellow face s smile is located at the point (0.4, -0.1). Now apply the scale operation again, making it look like the green face. Judging from the coordinate axes on the software tool, approximately where does this point end up after the scale operation is applied? Below, mathematically compute the image of point (0.4, -0.1) under the scale operation by multiplying it (in homogeneous coordinates) by the 3x3 scale matrix. If the results are not consistent with what you see on the display, double check your scale matrix and your calculations. 3

Part 2: Discovering transformations that do and do not commute Activity 3: Click the Next Activity button to advance to Activity 3. Now let's try some more challenging things. Sometimes when you apply two consecutive transformations, the order in which you apply them doesn't matter. For example, try scaling the yellow smiley face by 2 along both coordinate axes and then rotating it 45 degrees. Now reset the activity and apply the two transformations in the opposite order -- rotate first and then scale. You see that you get the same results either way. When the order doesn t matter, the operations are said to commute. But for some transformation combinations, the order does make a difference in the result. Using the yellow smiley face, find two transformations such that the result is obviously different depending on the order in which they are applied. Below, write the two transformations you discovered that do not commute. Below is a chart of the fundamental transformations. For each pair of transformations, try to find an example in which they don t commute using the software tool. For each pair in which you find such an example, write the letters NC in the box to indicate that they do not generally commute. For the entries down the diagonal, you will be looking for an example in which two of the same type of transformation do not commute. Rotation Translation Uniform Scale Non-uniform Scale Rotation Translation Uniform Scale Non-uniform Scale Hint there are four in all that don t commute. 4

Pick one of the boxes above in which you did not write NC. Just because you couldn t find an example in which the two transformations did not commute does not guarantee of course that no such example exists. Below, prove that the two transformations always commute by showing that the order in which you multiply the two transformation matrices doesn t matter. In other words, show that you get the same composite matrix either way. 5

Part 3: Composing Transformations Activity 4: Determine a transformation or a sequence of transformations that, when applied to the yellow smiley face, transform it to look like the green smiley face. Below, list the transformations in the order in which you applied them. Below, calculate the 3x3 composite matrix that was applied to the points making up the yellow face, transforming it to look like the green face. Show your work. 6

Reset the activity. Notice that, before the transformations are applied, the right side of the yellow face has coordinates (0.5, 0). Now apply the transformations again, making it look like the green face. Judging from the coordinate axes on the software tool, approximately where does the right side of the yellow face end up after the transformations are applied? Below, mathematically compute the image of point (0.5, 0) under the transformations by multiplying it (in homogeneous coordinates) by the 3x3 composite matrix you computed. If the results are not consistent with what you see on the display, double check your calculations. 7

Activity 5: So far, all of the rotations we have considered have been about the origin. Here we consider rotating about some other point in the plane. In this activity, the yellow smiley face is centered at (2, 3). Determine a sequence of transformations that, when applied to the yellow smiley face, rotates it 90 degrees counter-clockwise about its center as shown below. In other words, the face rotates "in place." The point that an object is rotated about is call the fixed point or the pivot point. Here the fixed point is (2, 3). Below, list the transformations in the order in which you applied them. Activity 6: In this activity the yellow smiley face is again centered at (2, 3). But here we want a sequence of transformations that will result in the yellow smiley face rotating 45 degrees counter-clockwise about the fixed point (0, 3), as shown below. Here the fixed point is neither the origin nor the center of the object! Below, list the transformations in the order in which you applied them. 45 o 8

Activity 7: So far we have only considered scaling objects about the origin. Here we consider how we can scale an object about some other fixed point in the plane. Determine a sequence of transformations that, when applied to the yellow smiley face, transforms it to look like the green smiley face. Note that both the yellow and green smiley faces are centered at ( -2, -1 ), but the green smiley face has been stretched by a factor of 2 along the X axis and by a factor of 3 along the Y axis. Below, list the transformations in the order in which you applied them. 9