CS559
Fall 2005

News
Calendar
Assignments

Lectures/Notes
Tutorials
Sample Code

Project 1
Project 2
Project 3

Basic Info
Policies

C++ hints


Written Assignment 3:
Transforms and Curves

This assignment is due in class on Tuesday, November 8th. at 9:30am.
(note: this was originally due on November 15th, but was changed when the project was delayed. If you were confused by this, we will accept late assignments.)

The first part of the assignment consists of material that may be on the midterm exam (and are meant as practice questions). The second part of the assignment is material that came after the exam.

Question 1: Transforms

Consider this desk lamp:

The lengths of the arms are 5, and the tip of the bulb is 1 unit from the joint. x,y, and theta 0-3 are all parameters to position the lamp.

Write an expression that computes the position of the bulb (point B) in the coordinate system of the desk. Your expression should be the product of a set of Matrices T(x,y,z) (that translates by x,y,z) and Rx(theta) that rotates theta degrees around the x axis (or Ry or Rz). These matrices are post-multiply and the rotations are measured counter clockwise in right-handed coordinate systems.

 

Question 2: Transforms

Do the Questions on this page. (trans-hw.pdf). For each of the 4 parts you should give both a matrix AND a program.

Question 3: Viewing

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) 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)

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

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

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

Question 4: Bezier and Cardinal Curves

A Cardinal Cubic Spline with tension 0 (e.g. a Catmull-Rom Spline) is defined by a set of n points p[0] through p[n-1].

Describe a procedure to represent this same curve as a set of Bezier segments. Be sure to state how many segments there will be, and explain how to position the control points for them.

Question 5: Bezier Curves

Use the De Castlejau algorithm to determine the value of a Bezier curve segment for (u=.5) if the control points are placed at (0,0), (0,2), (1,2), (2,2), (2,0).


Part 2: Stuff not on the midterm exam

Question 6:

Derive the blending functions for a cubic polynomial curve that interpolates p0 at u=0, interpolate p1 at u=1/3, interpolates p2 at u=2/3, and interpolates p3 at u=1.

Question 7:

Given a set of n control points are used to define a uniform, quadratic B-Spline. (see page 337 of the book). Describe how to convert these to a sequence of Bezier segments. (its easiest to convert them to a set of 3rd degree Bezier segments).