Docsity

Homework Assignment 3 for Computer Graphics | CS 4204, Assignments of Computer Graphics

Toggle sidebar
bg1
CS4204 Computer Graphics Fall 2008
Homework Assignment 3
Assignment 3 is due on Tuesday, 10/07/2008 3:30pm. You need to turn your homework in
before class start. Please write clearly on paper. Don’t forget to write your name and student
ID on each page of your homework.
Q1. (10 points) OpenGL pipeline describes how each vertex is transformed from a user-
defined 3D local coordinate system to 2D display device coordinate system. Please draw
each stage of OpenGL pipeline and name the coordinate system after each stage of
transformation.
Q2. (15 points) Structure graphics. Take a look at the following figure. If an OpenGL
function, drawline(), can draw a line segment of length 1, as shown on the right hand of the
figure. Please write an OpenGL function that can draw the structured line segments as
shown on the left hand of the figure. Assume each line segment has the same length of 1.
Also that all the line segments are all within the plane z=0.
pf2

Partial preview of the text

Download Homework Assignment 3 for Computer Graphics | CS 4204 and more Assignments Computer Graphics in PDF only on Docsity!

CS4204 Computer Graphics Fall 2008

Homework Assignment 3

Assignment 3 is due on Tuesday, 10/07/2008 3:30pm. You need to turn your homework in before class start. Please write clearly on paper. Don’t forget to write your name and student ID on each page of your homework. Q1. (10 points) OpenGL pipeline describes how each vertex is transformed from a user- defined 3D local coordinate system to 2D display device coordinate system. Please draw each stage of OpenGL pipeline and name the coordinate system after each stage of transformation. Q2. (15 points) Structure graphics. Take a look at the following figure. If an OpenGL function, drawline() , can draw a line segment of length 1, as shown on the right hand of the figure. Please write an OpenGL function that can draw the structured line segments as shown on the left hand of the figure. Assume each line segment has the same length of 1. Also that all the line segments are all within the plane z=.

Q3. (20 points) Point projection. A plane is defined by two unit vectors , and a point q. Given a new point p , what is its projected point p’ on the plane? Q4. (15 points) Reflection. Given a surface with normal vector and input vector , as shown below, what is the reflection vector of the vector? Assume all the vectors are normalize unit vectors. Q5. (20 points) Perspective transformation. In camera/eye coordinate system, we have two points p and q, inside the view frustum. We then define two lines, one using p and the origin (where camera/eye is), another using q and the origin. Please proof that, after perspective transformation, these two lines are parallel to each other.