Homework 1 for 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: Spring 2005;

Typology: Assignments

Pre 2010

Uploaded on 03/10/2009

koofers-user-d14-1
koofers-user-d14-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: Friday February 4, 2005
Due: Tuesday February 15, 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 Tuesday, February 15.
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. Let p1,p2,p3be three points in 3-D Euclidean space. We can linearly interpolate between pairs of these
points as follows:
p12(t) = (1 t)p1+tp20t1
p23(t) = (1 t)p2+tp3
Now suppose that we want to construct:
p123(t) = (1 t)p12 (t) + tp23(t)
Give an expression for p123 as a linear combination of the points p1,p2,p3and t.
2. Suppose that you are given two unit vectors: an up direction uand a forward direction f.
(a) Give an expression for the backward direction, involving only uand/or f.
(b) Give an expression for the left direction, involving only uand/or f.
(c) Suppose that you are standing at the point p. You wish to move forward to a new point p0which
is dunits from p. Give an expression for p0involving only d,u, and/or f.
3. Given a point qand direction vector v, we can define the line through qin the direction vby the
parametric equation:
p(t) = q+tv
In other words, the line is the set of all points p(t) for any real value of t.
Suppose that you are given a point rthat is not on the line p(t). Derive an equation for the perpendicular
distance of rto the line.
pf2

Partial preview of the text

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

CS 418: Homework

Assigned: Friday February 4, 2005

Due: Tuesday February 15, 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 Tuesday, February 15. 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. Let p 1 , p 2 , p 3 be three points in 3-D Euclidean space. We can linearly interpolate between pairs of these points as follows:

p 12 (t) = (1 − t)p 1 + tp 2 0 ≤ t ≤ 1 p 23 (t) = (1 − t)p 2 + tp 3

Now suppose that we want to construct:

p 123 (t) = (1 − t)p 12 (t) + tp 23 (t)

Give an expression for p 123 as a linear combination of the points p 1 , p 2 , p 3 and t.

  1. Suppose that you are given two unit vectors: an up direction u and a forward direction f. (a) Give an expression for the backward direction, involving only u and/or f. (b) Give an expression for the left direction, involving only u and/or f. (c) Suppose that you are standing at the point p. You wish to move forward to a new point p′^ which is d units from p. Give an expression for p′^ involving only d, u, and/or f.
  2. Given a point q and direction vector v, we can define the line through q in the direction v by the parametric equation: p(t) = q + tv In other words, the line is the set of all points p(t) for any real value of t. Suppose that you are given a point r that is not on the line p(t). Derive an equation for the perpendicular distance of r to the line.
  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