Computer Science 336 Fall 2017 Homework 2

Similar documents
Computer Graphics: Geometric Transformations

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

2D and 3D Transformations AUI Course Denbigh Starkey

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

Lecture 5 2D Transformation

Vector Algebra Transformations. Lecture 4

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

Midterm Exam Fundamentals of Computer Graphics (COMP 557) Thurs. Feb. 19, 2015 Professor Michael Langer

Affine Transformation. Edith Law & Mike Terry

Lecture 6 Sections 4.3, 4.6, 4.7. Wed, Sep 9, 2009

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

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

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

3D Transformation. In 3D, we have x, y, and z. We will continue use column vectors:. Homogenous systems:. x y z. x y z. glvertex3f(x, y,z);

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

Computer Graphics 7: Viewing in 3-D

Transformation. Computer Graphics October. Dr Anton Gerdelan

Computer Graphics. Chapter 7 2D Geometric Transformations

N-Views (1) Homographies and Projection

3D Transformations World Window to Viewport Transformation Week 2, Lecture 4

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

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

Homework #1. Displays, Image Processing, Affine Transformations, Hierarchical Modeling

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

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

Computer Graphics Hands-on

Answers to practice questions for Midterm 1

PreCalculus Unit 1: Unit Circle Trig Quiz Review (Day 9)

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

1 Affine and Projective Coordinate Notation

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

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

Graphics and Interaction Transformation geometry and homogeneous coordinates

Transforms. COMP 575/770 Spring 2013

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

ME5286 Robotics Spring 2013 Quiz 1

2D Geometric Transformations and Matrices

GEOMETRIC TRANSFORMATIONS AND VIEWING

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

UNIT 2 2D TRANSFORMATIONS

CS452/552; EE465/505. Transformations

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

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

Transformations Computer Graphics I Lecture 4

Computer Graphics Geometric Transformations

ME5286 Robotics Spring 2014 Quiz 1 Solution. Total Points: 30

2D TRANSFORMATIONS AND MATRICES

PC-MATLAB PRIMER. This is intended as a guided tour through PCMATLAB. Type as you go and watch what happens.

Homework #1. Displays, Image Processing, Affine Transformations, Hierarchical Modeling

CT5510: Computer Graphics. Transformation BOCHANG MOON

Homework #1. Displays, Alpha Compositing, Image Processing, Affine Transformations, Hierarchical Modeling

Homework 5: Transformations in geometry

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

(Refer Slide Time: 00:04:20)

CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES

Name: 1) Which of the following properties of an object are not preserved under a rotation? A) orientation B) none of these C) shape D) size

Coordinate transformations. 5554: Packet 8 1

MAT 343 Laboratory 4 Plotting and computer animation in MATLAB

Transformations with Matrices Moved by Matrices

Guided Problem Solving

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

b 1. If he flips the b over to the left, what new letter is formed? Draw a picture to the right.

2D/3D Geometric Transformations and Scene Graphs

Geometric Transformations

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

Modeling Transformations

Transformations Computer Graphics I Lecture 4

CS380: Computer Graphics 2D Imaging and Transformation. Sung-Eui Yoon ( 윤성의 ) Course URL:

Math 308 Autumn 2016 MIDTERM /18/2016

Transformations Week 9, Lecture 18

Section III: TRANSFORMATIONS

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

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

18.02 Multivariable Calculus Fall 2007

Graphics Pipeline 2D Geometric Transformations

Lecture 9: Transformations. CITS3003 Graphics & Animation

Computer Vision Projective Geometry and Calibration. Pinhole cameras

AH Matrices.notebook November 28, 2016

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

Lesson 1. Unit 2 Practice Problems. Problem 2. Problem 1. Solution 1, 4, 5. Solution. Problem 3

Transformations. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Homework 5: Transformations in geometry

Homogeneous Coordinates and Transformations of the Plane

Overview. Affine Transformations (2D and 3D) Coordinate System Transformations Vectors Rays and Intersections

Lesson 20: Exploiting the Connection to Cartesian Coordinates

Hiram High School Accelerated Pre-Calculus Summer Assignment

521466S Machine Vision Exercise #1 Camera models

4-1 Congruence and Transformations

Matrix Inverse 2 ( 2) 1 = 2 1 2

Homework #1. Displays, Image Processing, Affine Transformations, Hierarchical modeling, Projections

Finite Math - J-term Homework. Section Inverse of a Square Matrix

Revision Problems for Examination 2 in Algebra 1

Institutionen för systemteknik

AP Calculus AB Summer Review Packet

Parallel and perspective projections such as used in representing 3d images.

Basic Elements. Geometry is the study of the relationships among objects in an n-dimensional space

Introduction to Homogeneous coordinates

Translations SLIDE. Example: If you want to move a figure 5 units to the left and 3 units up we would say (x, y) (x-5, y+3).

SFU CMPT 361 Computer Graphics Fall 2017 Assignment 2. Assignment due Thursday, October 19, 11:59pm

Part 3: 2D Transformation

Transcription:

Computer Science 336 Fall 2017 Homework 2 Use the following notation as pseudocode for standard 3D affine transformation matrices. You can refer to these by the names below. There is no need to write out the entries unless you need to actually perform multiplication. cos θ sin θ 0 0 sin θ cos θ 0 0 RotateZ(θ) = (Rotate about z-axis, i.e., in the x-y plane) 0 0 1 0 Translate(tx, ty, tz) = 1 0 0 tx 0 1 0 ty 0 0 1 tz Scale(sx, sy, sz) = sx 0 0 0 0 sy 0 0 0 0 sz 0 Please show your work clearly and legibly; remember, we are going to have to read these papers.

1. The illustration below shows two vectors and a point o. Define a frame F = [b1, b2, b3, o], where we can assume that b3 is irrelevant here. a) Sketch, circle and clearly label a point q that has the coordinates [-1 2 0 1] T with respect to F. b) The illustration also shows a point p. Determine (geometrically) the approximate coordinates of the point p below with respect to the frame F. Justify your answer using a sketch and/or brief explanation. Make a careful sketch and try to estimate the numbers reasonably accurately. b1 :::: b2 :::: o< p<

2. A = Translate(1,-3,0) = 1 0 0 1 0 1 0 3 0 0 1 0, B = Rotate(90) = 0 1 0 0 1 0 0 0 0 0 1 0 a) Multiply out the two products AB and BA.

b) In the axes on the right, sketch the result applying the transformation BA (A, then B) to the triangle. Use the matrix BA from the previous page to calculate the new coordinates of the three vertices, label them on your sketch, and verify that your result makes sense geometrically. (Does it look like you've translated over 1 and down 3, and then rotated 90 degrees about the origin?) Remember that a 2D point such as (2, 3) is represented in homogeneous coordinates as [2 3 0 1] T. (2, 3) (3, 3) (2, 1)

c) Do the same for the transformation AB. (2, 3) (3, 3) (2, 1) c) A and B are affine transformation matrices, since they have [] in the bottom row. Any product of affine transformations is also affine. Therefore BA (given to us as a translation followed by a rotation) is affine. An affine transformation is defined as a linear transformation followed by a translation. So there must be a way to write BA as a product of matrices TM such that M is linear and T is a translation. Find T and M. (A 4x4 matrix represents a linear transformation if the bottom row is [] and the rightmost column is also [] T.)

3. A certain affine transformation transforms the triangle on the left into the triangle on the right. Write down a matrix for this transformation as a product of the standard transformation matrices defined on the first page. (There are many possible correct answers.) You may want to check your work by multiplying everything out. (- 6, 4) (- 2, 4) (2, 3) (3, 3) (- 2, 3) (2, 1)

4. The figure below shows a frame (coordinate system) F = [b1, b2, b3, o] along with a second frame F = v1, v2, v3, p, where the new origin p has coordinates [11 4 0 1] T with respect to F. The new frame is rotated 90 degrees counterclockwise and the y-axis is stretched by 2. Note that v1 and v2 are orthogonal, v1 has unit length, and v2 has length 2. (You can ignore the invisible third basis vectors b3 and v3 since nothing is changing outside of the x-y plane.) Thus the matrix M = Translate(11, 4, 0) * RotateZ(90) * Scale(1, 2, 1) transforms F to F, i.e. F = FM. Note that the inverse of M is M -1 = Scale(1, 0.5, 1) * RotateZ(-90) * Translate(-11, -4, 0). x y v1 (11, 4) v2 y Q (7, 2) b2 (0, 0) b1 R (5, 0) P (7, 0)

a) When the triangle PQR is transformed by M, where does it end up? i) Sketch it and label the coordinates of the transformed vertices with respect to the original frame F; for example, the point R has coordinates [5 0 0 1] T, and M[5 0 0 1] T is [11 9 0 1] T. ii) Multiply out M and use the matrix M to calculate the coordinates of the transformed triangle with respect to the original frame. Show your calculations and verify geometrically that your results make sense. (Note that the drawing is to scale).

b) i) Determine (geometrically) the coordinates, with respect to F, of the points labeled P, Q, and R. ii) Then, find the inverse M -1 of the matrix M from part (a). Calculate M -1 c for the coordinate vectors c for each point P, Q, and R and show that your answers agree with the geometrically obvious ones (Again using R as an example, M -1 [5 0 0 1] has to be [-4 3 0 1] T, since we can see from the picture that 4v? + 3v A + p is point R.)