ECS 175: Computer Graphics Homework 1 - Spring 2004, Assignments of Computer Graphics

The first homework assignment for the computer graphics course, ecs 175, offered in spring 2004. The assignment includes three questions: setting opengl colors for different shades of pink, finding the z value for a given point in a 3d triangle using linear interpolation, and finding the vectors left fixed by a given affine transformation. Additionally, there is a problem about using bezier curves for animating a ball with spin.

Typology: Assignments

Pre 2010

Uploaded on 07/30/2009

koofers-user-896
koofers-user-896 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ECS 175: Computer Graphics
Homework 1 - Spring 2004
Due in class Mon May 3
1. There are many shades of pink. Give two OpenGL color3f commands, one to make
a bright, hot, day-glo pink, and the other to make a pale, delicate rose.
2. The zvalues at any point in a 3D triangle are calculated in the rasterization hardware
using linear interpolation. For a 3D triangle with vertices (1,2,6), (5,4,1), (8,1,1),
what is the zvalue which will be found for the point with (x, y) coordinates (5,3)? In
other words, for the point (5,3, z), find z.
3. Find all two-dimensional vectors which are left fixed by the following affine transfor-
mation:
31 4
2 2 6
0 0 1
4. Bezier curves can be used to control the path of an animated object. For instance, the
parabolic path of a thrown basketball can be described by a quadric Bezier curve. Say
we want 10 frames of animation. In frame zero the center of the ball is at (0,0), and
in frame 9 its center is at (6,0). To make the ball arc up inbetween, we add a third
control point at (3,6). Say we also want to put some spin on the ball, so that in each
frame it rotates around its own center by π/10.
Write the matrix for the modeling transformation you would use to place the ball
correctly in frame i. The coefficients in the matrix can be functions of i, and you do
not need to find real values for anything (eg. writing cos(π/10) is just fine).
1

Partial preview of the text

Download ECS 175: Computer Graphics Homework 1 - Spring 2004 and more Assignments Computer Graphics in PDF only on Docsity!

ECS 175: Computer Graphics

Homework 1 - Spring 2004

Due in class Mon May 3

  1. There are many shades of pink. Give two OpenGL color3f commands, one to make a bright, hot, day-glo pink, and the other to make a pale, delicate rose.
  2. The z values at any point in a 3D triangle are calculated in the rasterization hardware using linear interpolation. For a 3D triangle with vertices (1, 2 , 6), (5, 4 , 1), (8, 1 , 1), what is the z value which will be found for the point with (x, y) coordinates (5, 3)? In other words, for the point (5, 3 , z), find z.
  3. Find all two-dimensional vectors which are left fixed by the following affine transfor- mation: (^)  

 

  1. Bezier curves can be used to control the path of an animated object. For instance, the parabolic path of a thrown basketball can be described by a quadric Bezier curve. Say we want 10 frames of animation. In frame zero the center of the ball is at (0, 0), and in frame 9 its center is at (6, 0). To make the ball arc up inbetween, we add a third control point at (3, 6). Say we also want to put some spin on the ball, so that in each frame it rotates around its own center by π/10. Write the matrix for the modeling transformation you would use to place the ball correctly in frame i. The coefficients in the matrix can be functions of i, and you do not need to find real values for anything (eg. writing cos(π/10) is just fine).