Homework 1 Questions - Interactive Computer Graphics | CS 418, Assignments of Computer Graphics

Material Type: Assignment; Class: Interactive Computer Graphics; Subject: Computer Science; University: University of Illinois - Urbana-Champaign; Term: Fall 2005;

Typology: Assignments

Pre 2010

Uploaded on 03/16/2009

koofers-user-pcg-1
koofers-user-pcg-1 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 418: Homework #1
Assigned: Tuesday August 30, 2005
Due: Thursday September 8, 2005
This homework is meant to exercise some basic math skills that will come in handy later. Much of the linear
algebra and geometric knowledge you need can be found in the textbook. You should return your completed
assignment at the end of class on Thursday, September 8.
Please be organized when writing your answers to these questions. Make sure that all solutions are
clearly indicated and labelled with the question they are answering. Remember to write clearly and legibly.
Unreadable answers will receive 0 credit.
For the purposes of this homework, and indeed the rest of the course, you should assume that points/directions
are represented by column vectors and that we are using a right-handed coordinate system.
1. Suppose that we are given a triangle pqr in the plane. We denote the coordinates of its three corners by
p,q, and r. We want to construct a new triangle p0q0r0such that (a) p0is at pand (b) q0and r0are at
the midpoints of the segments pq and pr, respectively.
pp'q'
q
r
r'
(a) Give equations for p0,q0,r0in terms of p,q,r.
(b) Let Gbe the 3×2 matrix whose rows are the 2-vectors p,q,r:
G=
p
q
r
We can compute the matrix G0whose rows correspond to p0,q0,r0as the product of Gwith a
matrix of constant coefficients M:
G0=MG
Give the matrix M.
2. Prove that the vectors u= [x y] and v= [y x] are perpendicular.
3. Suppose that we define a matrix parameterized by two real values a, b as follows:
M(a, b) =
1 0 a
0 1 b
0 0 1
(a) Show that M(a,b)M(c,d) = M(a+c, b+d).
(b) Prove that the inverse of M(a,b) is M(-a,-b).
pf2

Partial preview of the text

Download Homework 1 Questions - Interactive Computer Graphics | CS 418 and more Assignments Computer Graphics in PDF only on Docsity!

CS 418: Homework

Assigned: Tuesday August 30, 2005

Due: Thursday September 8, 2005

This homework is meant to exercise some basic math skills that will come in handy later. Much of the linear algebra and geometric knowledge you need can be found in the textbook. You should return your completed assignment at the end of class on Thursday, September 8. Please be organized when writing your answers to these questions. Make sure that all solutions are clearly indicated and labelled with the question they are answering. Remember to write clearly and legibly. Unreadable answers will receive 0 credit. For the purposes of this homework, and indeed the rest of the course, you should assume that points/directions are represented by column vectors and that we are using a right-handed coordinate system.

  1. Suppose that we are given a triangle pqr in the plane. We denote the coordinates of its three corners by p, q, and r. We want to construct a new triangle p′q′r′^ such that (a) p′^ is at p and (b) q′^ and r′^ are at the midpoints of the segments pq and pr, respectively.

p q p ' q '

r

r '

(a) Give equations for p′, q′, r′^ in terms of p, q, r. (b) Let G be the 3×2 matrix whose rows are the 2-vectors p, q, r:

G =

p q r

We can compute the matrix G′^ whose rows correspond to p′, q′, r′^ as the product of G with a matrix of constant coefficients M: G′^ = MG Give the matrix M.

  1. Prove that the vectors u = [x y] and v = [−y x] are perpendicular.
  2. Suppose that we define a matrix parameterized by two real values a, b as follows:

M (a, b) =

1 0 a 0 1 b 0 0 1

(a) Show that M(a,b)M(c,d) = M(a+c, b+d). (b) Prove that the inverse of M(a,b) is M(-a,-b).

  1. A unit circle in the plane, centered at the origin, is described by the equation:

x^2 + y^2 = 1

The circle is the set of all points for which this equation holds. We can rewrite this in a slightly more convenient form using the vector p =

[

x y

]

as follows:

p·p = pTp = 1

(a) Two distinct points p 1 , p 2 in the plane determine a line. We can describe this line by the parametric equation p(t) = p 1 + td Determine the correct value of d subject to the constraint that ‖d‖ = 1. (b) Suppose that we want to determine where this line intersects the unit circle. Obviously, any such intersection point must satisfy both the circle equation and the line equation. In other words, the following must hold for any point of intersection of the line and the unit circle:

p(t)·p(t) = 1

Derive an equation for the values of t for which p(t) lies on the circle. (Hint: You’ll want to dig up the formula for the roots of a quadratic polynomial.) (c) A line can intersect a circle at exactly 0, 1, or 2 distinct points. For a given choice of p 1 and p 2 , explain precisely how you can determine which of these 3 cases holds from the algebraic properties of the equation you just derived.

  1. It is occasionally useful to think of points in the plane as complex numbers: we can identify the point (x, y) with the complex number x + iy. A rather surprising discovery made by Euler is that:

eiθ^ = cos θ + i sin θ

(a) Compute the complex product eiθ^ (a + ib). (b) Interpreted geometrically, the product you computed in the previous part is a transformation of the point (a, b). Specify what transformation has been performed. Please be precise. (c) What transformation is performed by the product ρeiθ^ (a + ib)? (d) What transformation is performed by the product

eiθ^ eiφ

(a + ib)?

Page 2