1
Assignment 5 (NonProgramming & Programming)
Worth:
10 points
Due Date and Time:
Before class begins at 12:20 pm on 07/10/2007. Copy zipped
programming submission to CS250 web page. Place your stapled nonprogramming
submission on instructor’s desk in Michelangelo.
Topics
•
Bounding Volumes
•
Culling
•
Triangle clipping using modified SutherlandHodgeman algorithm for “thick” planes.
NonProgramming Statement
•
Consider a line in 3D going from view frame points
(
)
3
,
10
,
6
1
v
P
to
(
)
2
,
5
,
3
2
−
−
v
P
and a semiinfinite viewing pyramid in the region
v
v
v
y
x
y
≤
≤
−
,
v
v
v
y
z
y
≤
≤
−
,
which is bounded by the planes
v
v
x
y
+
=
,
v
v
x
y
−
=
,
v
v
z
y
+
=
,
v
v
z
y
−
=
. The
projection plane is at
1
=
v
y
. Answer the following questions with appropriate
pictures and derivations:
1) If NDC frame is defined by inequalities
2
1
2
1
≤
≤
−
n
x
,
2
1
2
1
≤
≤
−
n
y
,
2
1
2
1
≤
≤
−
n
z
, compute perspective transform
persp
M
.
2) Apply
persp
M
on
v
P
1
and
v
P
2
to compute corresponding clip frame
coordinates
1
~
P
and
2
~
P
, respectively.
3) Project
1
~
P
and
2
~
P
into corresponding NDC frame coordinates
n
P
1
and
n
P
2
,
respectively.
4) Compute the viewport transform
vp
M
for a
800
800
×
pixel display viewport
and unsigned
−
16
bit depth buffer.
5) Apply
vp
M
on
n
P
1
and
n
P
2
to compute endpoints
d
P
1
and
d
P
2
, respectively.
6) Apply a line clipping algorithm on device frame line segment
d
d
P
P
2
1
to
compute endpoints of clipped line.
7) Apply a line clipping algorithm on clip frame line segment
2
1
~
~
P
P
, project
clipped line segment to NDC coordinates followed by its transform into
device coordinates.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '07
 Ghali
 Executable, Clipping, Line clipping, frame line segment

Click to edit the document details