main-p2-phase3

Project 2 Phase 3 - Theoretical Background

This written homework is designed to help check to make sure you understand important concepts relating to the project.

The homework is also designed to help you prepare for the exam. Many of the problems on the homework are very similar to the questions on the exam.

This homework is due on Tuesday, October 30th at noon (12pm). Note: this is different than every other due date in class. However, you have strong incentive to do the homework earlier as it will be good preparation for the exam.

Turn your assignment in by leaving a file in your P2-Written directory. This is the same place as you turned your P2 Phase 1 in. If you work in pencil and paper, you may turn your paper in to the TA at the exam and he will scan it for you.

We actually prefer if you leave your answer in fractional / irrational form. (So sqrt(3)/2 is preferred to 0.86602540378443864676372317075294.

Note: some of the questions relate to curves, which will be discussed in class after this assignment is handed out.

Rotations are always counter clockwise. To see what the rotation around an axis does, stick your right thumb in the direction of the axis - your fingers will curl in the direction of rotation.

Question 1

Give a 4x4 (homogeneous for 3D) matrix that performs a rotation such that the Z axis points towards the point (0,1,1) and the Y axis points towards the point (0,-1,1).(hint - where does the X-Axis point?)

Question 2

An object is rotated 180 degrees around its Y axis. It is then rotated -135 around its X axis.

  • Where do the three axes (in the objects coordinate system) go in the result?
  • What is the matrix form of this transformation
  • What is the inverse of this matrix? (hint: read in the book about the inverses of rotation matrices)

Question 3

A vertex (point) is drawn at the origin. It is viewed through a camera that is positioned with the viewing matrix:

1/2 -1/2 0 -2
1/2  1/2 0 -2
0      0 1  3
0      0 0  1

The object that the vertex is drawn with transformation matrix:

0 -1 0 3
1  0 0 4
0  0 1 5
0  0 0 1

This simple projective transform matrix is used:

1 0  0 0
0 1  0 0
0 0  0 1
0 0 -1 0

Where does the point appear in screen coordinates?(give the x,y position)

Question 4

In this question, we will be making pictures of a cube. The cube is of unit size (that is, all of its edges have length 1), and is placed such that one of its corners is at the origin, and the edges follow the positive axes. There is a letter painted on each side of the cube. The letter @F@ is painted on the front, @B@ on the back, @L@ on the left, @R@ on the right, @T@ on the top, and @U@ on the underside (bottom). The back of the object is the xy plane (z=0), the front of the object is the xy plane with z=1. Left and right are defined as if you were looking at the object from the front. Several views are shown below.

Sketch the view of the cube as seen by the cameras specified, being sure to label each face with the appropriate letter in roughly the right orientation. VRP is the view reference point (the center of the image plane) and Look At is a point along the view plane normal. Assume some reasonable field of view big enough to fit the entire cube in the view, and that the viewport is square. You need not get the view exactly (in fact, you can@t since we didn@t tell you what the field of view is).

(note: if you think of the VRP as the “lookat” or “eye” point, you will get the same answer for this question)

4A) VRP 6,0,0; Look at 0,0,0; VUP 0,1,0.

4B) VRP -6,1,1; Look at: 1,1,1; VUP 0,0,1.

4C) VRP -6,6,6; Look at 0,0,0; VUP 0,0,1.

Question 5

Write a parametric function for the curve consisting of three line segments connecting the four points (0,0), (1,0), (1,3), (3,3). Have the paremeterization be unit (e.g. from 0 to 1) and arc-length parameterized.

(remember: arc-length parameterization means that the “speed” of the parameterization is constant, not necessarily unit)

Question 6

A Segment of a Catmul-Rom cubic (in 2D) has its control points at (0,0), (0,2), (4,2), and (4,1). A point moves along this curve, starting at the begining at (t=0) and getting to the end of the segment at (t=1). The point moves with a constant rate of change in its parameters.

  • Where is the point at t=1/2?
  • What direction is it facing? (give a vector) (OK, points don’t have directions, but if it were a train and the curve was a track, what direction would it be facing)
  • What is the magnitude of its velocity?

Question 7

We have a 5th order (4th degree) Bezier curve segment with control points (0,0), (0,2), (2,4), (4,2), (4,0). We want to connect a degree 3 (cubic) Bezier to this curve so that the two curves form a closed loop (the beginning of one curve is the end of the other), that has C(1) continuity. Where would the 4 control points of the curve go?

Question 8

Divide the 5th order curve in Question 7 into two 5th order curves, splitting the curve at its half-way point. (hint: use the DeCastlejau algorithm)

Page last modified on October 22, 2007, at 04:05 PM