Docsity

UM EECS 487 Fall 2008 Homework Assignment 1 - Prof. Sugih Jamin, Assignments of Electrical and Electronics Engineering

Toggle sidebar
bg1
UM EECS 487 Fall 2008
Homework Assignment 1
DUE DATE Mon, 9/22/2008, 1:40 pm in lab
September 12, 2008
Show your work for all the questions below. If you don’t show your work, you will get only a third
of the points if your answers are correct.
1. Line rasterization: using the mid-point algorithm presented in class, make all modifications neces-
sary and fill out the tables below to draw the lines specified. If you modify the algorithm, include
the modified algorithm in your answer. (5 pts)
(a) (−3,−4) to (−8,−12)
x y d
... ... ...
(b) (3,−7) to (11,−10)
x y d
... ... ...
2. Clipping (4 pts)
Clip a segment AB against a window Wusing the most efficient of either Cohen-Sutherland or
Cyrus-Beck algorithms or parts thereof where:
(a) A= (−10,20), B = (50,−20),and W={(x, y) : 0 ≤x≤80,0≤y≤30}.
(b) A= (−10,20), B = (50,−20),and W={(x, y) : |x|+|y| ≤ 40}.
3. 3D triangle (3 pts)
(a) Find a 3D vector nof unit length and orthogonal to the triangle ABC where
A= (5,3,2), B = (−1,7,2),and C= (0,0,5).
(b) What is the area of the triangle ABC ?
4. Barycentric coordinates (4 pts)
Find the barycentric coordinates of a point M= (10,25) within triangle P QR
where P= (−10,10), Q = (30,15), R = (10,50).
5. Transforms (4 pts)
Apply the linear transformation given by matrix M="2−2
2 2 #to the triangle ABC , where
A= (1,3), B = (4,3),and C= (4,1). Let A0=M A, B0=M B, and C0=MC . Find the area
of triangle A0B0C0. Describe in words what the transformation Mdoes.
1
pf2

Partial preview of the text

Download UM EECS 487 Fall 2008 Homework Assignment 1 - Prof. Sugih Jamin and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

UM EECS 487 Fall 2008

Homework Assignment 1

DUE DATE Mon, 9/22/2008, 1:40 pm in lab

September 12, 2008

Show your work for all the questions below. If you don’t show your work, you will get only a third of the points if your answers are correct.

  1. Line rasterization: using the mid-point algorithm presented in class, make all modifications neces- sary and fill out the tables below to draw the lines specified. If you modify the algorithm, include the modified algorithm in your answer. (5 pts)

(a) (− 3 , −4) to (− 8 , −12)

x y d

.........

(b) (3, −7) to (11, −10)

x y d

.........

  1. Clipping (4 pts) Clip a segment AB against a window W using the most efficient of either Cohen-Sutherland or Cyrus-Beck algorithms or parts thereof where:

(a) A = (− 10 , 20), B = (50, −20), and W = {(x, y) : 0 ≤ x ≤ 80 , 0 ≤ y ≤ 30 }. (b) A = (− 10 , 20), B = (50, −20), and W = {(x, y) : |x| + |y| ≤ 40 }.

  1. 3D triangle (3 pts)

(a) Find a 3D vector n of unit length and orthogonal to the triangle ABC where A = (5, 3 , 2), B = (− 1 , 7 , 2), and C = (0, 0 , 5). (b) What is the area of the triangle ABC?

  1. Barycentric coordinates (4 pts) Find the barycentric coordinates of a point M = (10, 25) within triangle P QR where P = (− 10 , 10), Q = (30, 15), R = (10, 50).
  2. Transforms (4 pts)

Apply the linear transformation given by matrix M =

[ 2 − 2 2 2

] to the triangle ABC, where

A = (1, 3), B = (4, 3), and C = (4, 1). Let A′^ = M A, B′^ = M B, and C′^ = M C. Find the area of triangle A′B′C′. Describe in words what the transformation M does.

  1. Ellipse rasterization (15 pts) Generalize the mid-point algorithm for line-rasterization to arrive at an efficient algorithm to ras- terize the circumference of an axis-aligned ellipse. The equation describing such an ellipse is of the form

(x − x 0 )^2 a^2

(y − y 0 )^2 b^2

where (x 0 , y 0 ) is the center of the ellipse, and a and b are the lengths (in pixels) of the two axes (termed the major and minor axes depending on which is larger, a > 0 and b > 0 ). (x 0 , y 0 ), a and b are all provided to the algorithm. Describe the highlights and design choices of your approach before presenting the actual algorithm.