Description
Written Problem
Note that this is the same as the problem on the practice exam. Assume that we have a
Lambertian polyhedron illuminated by a collimated source at the same position as the viewer.
a) What is the reflectance map R(p, q) for this case?
Suppose that from an image we have recovered the edges below corresponding to a place in space
where 3 planes meet. The angles correspond to angles in the image.
\ C
\
\ 120 deg.
\
150 ___________________
deg. 
 90 deg.
B 
 A


b) Draw a diagram in gradient space with points corresponding to the gradient of each plane
and their relationship. Assume orthographic projection.
c) Suppose that our imaging system is calibrated so that measured image irradiance equals the
corresponding value in the reflectance map (E(x, y) = R(p, q)). If we measure image irradiance
values of 1.0 for plane A and √
1
5 for plane B, then determine the irradiance of plane C and the
orientation (p, q) for each plane.
Computer Problem
In this problem, you will write a program to generate images of a sphere under orthographic
projection using a reflectance model. Consider a representation for a sphere centered on the
optical axis with radius r and center (0, 0, z0)
z(x, y) = z0 +
!
r2 − (x2 + y2) (x2 + y2
) ≤ r2 (1)
What is the unit surface normal Nˆ (x, y) to the sphere as a function of x and y? Turn in this
answer with your written homework.
We will consider only illumination by point sources. Let Sˆ denote a unit vector in the direction
of the source. We assume that the source is distant relative to the size of the sphere so that for a
given source position, the vector Sˆ is constant across the surface of the sphere. We let Vˆ denote
a unit vector in the direction of the camera. We assume that the camera is distant relative to
the size of the sphere so that Vˆ for this geometry is always (0, 0, 1). The scene radiance L for a
Lambertian surface is proportional to cos(θ) where θ is the angle between Sˆ and Nˆ . For a more
general surface, we can write
L = aLl + (1 − a)Ls (2)
for a constant a (0 ≤ a ≤ 1) where Ll is the scene radiance due to Lambertian reflection
Ll = cos(θ) (3)
and Ls is the scene radiance due to specular reflection. We can model Ls using
Ls = e−(α/m)2
(4)
where m is a constant that is related to the roughness of the surface and α is defined as follows.
Let Hˆ be the unit vector that is the angular bisector of Vˆ and Sˆ, i.e.
Hˆ = Vˆ + Sˆ
Vˆ + Sˆ (5)
Then α is the angle in radians between Nˆ and Hˆ . Hˆ is the hypothetical normal to a surface
that would give perfect specular reflection in the direction of the camera Vˆ . Thus, α measures
how much Nˆ deviates from this orientation. If α is small, then Ls will be near 1. Otherwise Ls
will be small.
Note that the maximum value of L is 1. Your program should generate images of the sphere
by evaluating (2) across the surface and scaling the resulting values by 255 to generate numbers
that are appropriate for eight bit pixel values. Note that we are using the fact that image
irradiance is proportional to scene radiance. Each image will have only one source position Sˆ.
For each image, only the vector Nˆ should change as you compute the image since Sˆ and Vˆ are
assumed constant. Try different values for Sˆ, m, a, and r to generate images to submit. You are
encouraged to experiment with different values for these parameters and to try to understand
their role in the image formation process.