4 possible intensities off, level 1, level2, full (or level3) 2 1 3 1 1 3 1 2 1 3 x x x x x x x x x x x x x x x The
slope is 2/4 or m=½.
Therefore yk+1 = yk + m. Since we are anti-aliasing, we need to
supersample. Instead of running the
algorithm from x=0 to 4 (5 pixels of data), we need to run the algorithm
from x=0 to 14 (15 pixels of
data. 3 times as many times) 0
0 1
½ 2
1 3
1-1/2 4
2 5
2-1/2 6
3 7
3-1/2 8
4 9
4-1/2 10 5 11 5-1/2 12 6 13 6-1/2 14 7 7 1 3 1 7 3 5
![]()
![]()
![]()
![]()
![]()


|
1 |
2 |
1 |
|
2 |
4 |
2 |
|
1 |
2 |
1 |
Use the same data and supersampling as in 1a. But this time use the weighted 3x3 matrix. There are several pixel intensities: ranging from 0, and then 1 to 8.

Homework 2 CMPS160:
|
Angle |
cos |
sin |
|
0 |
1 |
0 |
|
30 |
√3/2 |
1/2 |
|
45 |
√2/2 |
√2/2 |
|
60 |
1/2 |
√3/2 |
|
90 |
0 |
1 |
NAME:__________________
2. Adapted
(yet changed) from Suresh Lodha
a)
A
cubical table is defined in its local coordinate frame centered around the
origin and with sides of length 4. It
is placed in the world so that it is resting on the xz-plane and centered at
(1,2,2). What is the matrix that
transforms the table points from local to world coordinates? Call it M1
M1 = 1 0 0 1
0
1 0 2
0
0 1 2
0
0 0 1
b)
A
cylindrical vase of radius 1.0 is defined in its local coordinate system
centered on the y-axis and extends from 0 to 2 in y. The vase is to be placed on top of the table at the table’s
center top surface. What is the matrix
that transforms the vase from local to the table coordinates? Call it M2
The vase needs to be placed on the table. The table is centered on the origin. The surface of the table is at y=2. Therefore we need to lift the vase by 2 units.
M2 = 1 0 0 0
0
1 0 2
0
0 1 0
0
0 0 1
c) The vase is knocked over by a z-rotation of 90
degrees. (Do not worry that it sinks into the table). What is the matrix that describes this rotation? Call this M3
The vase is already sitting on the origin. Therefore just knock it over the z axis. This is a z-rotation matrix
M3 = 0 -1 0 0
1 0
0 0
0 0
1 0
0 0
0 1
d) What are the matrices (list them in order) that
describe the vase points in terms of the world frame?
First rotate the
vase, then put it on the table, then put the table (with the vase) in the
world.
e)
What is the location of the center top of the vase as seen from
the world coordinates? Show all work!
We can either calculate the dot product M1
· M2 or we can remember that T(x1, y1,
z1) · T(x2,y2,z2) = T(x1+x2, y1+y2, z1+z2)
0 1 0 4
0 0 1 2
0 0 0 1
We take this result and matrix multiply
with M3
1 0
0 4
0 0
1 2
0
0 0 1
We then transform the top of the vase. The top of the vase is the point (0,2,0). When we calculate M1 · M2· M3· P we get P’= (-1,4,2)