Assignment 2 - Mathematics

advertisement
MATH 225 Calculus III
Dr. Ed Donley
Assignment 2
Due Wednesday, March 30, 2011
Instructions: Each group of three students should submit one typed report from the group. This report
should be well-written, describing the problem, your group's solution, and any pertinent intermediate steps
required to obtain that solution. Include mathematical equations and diagrams where relevant.
Computations and graphs should be created on your calculator. Your report should include screen shots of
graphs, where appropriate. Each of the three group members should be responsible for writing the report for
one of the three assignments during the semester. The group member who writes this report should be
different from the group members who write the reports for the other projects. List all group members'
names and identify the primary writer on your report.
When light reflects off of a mirrored surface, the light ray’s angle of incidence with the surface’s normal
vector equals the angle of reflection. Suppose that a mirrored surface lies along the graph of z = sin(2x + 3y).
A light ray emanating from the point source S(–2, 7, 3) travels in the direction
s = <1, –2, –1>. Where does the light ray strike the surface and in what direction is it reflected?
Most surfaces reflect light with a combination of diffuse scattering and specular reflection. Diffuse
scattering is caused when light penetrates the surface and is reflected back in all directions. Specular
reflection is like a mirror, except that the light is slightly scattered. Matte surfaces are dominated by diffuse
scattering and shiny surfaces are dominated by specular reflection. Vector calculus can be used to calculate
the amount of light from a source, located at the point S, bouncing off of a surface at point P that will reach a
viewer’s eye at point E. Let Is be the intensity of the light at its source. We will use a value of 0 for no light
and a value of 1 for maximum intensity.
In computer graphics, the intensity of the diffuse component is Id = Is cd cos d, where d is the angle between
⃗⃗⃗⃗
𝑆𝑃 and n. The vector n is normal to the surface and cd, the diffuse reflection coefficient, depends on how
matte the surface is. The diffuse component does not depend on the direction of the eye, since the reflected
light is the same intensity in all directions.
The specular component in computer graphics is often calculated using the Phong model. Let r be a vector
pointing in the direction of reflection off of a perfect mirrored surface. Let sp be the angle between r and
⃗⃗⃗⃗⃗ . Then the specular component is Isp = Is csp (cos d)f where csp, the specular reflection coefficient,
𝑃𝐸
depends on the shininess of the surface and f > 1 determines how focused the highlights are. Highlights are
more spread out when f is small.
In computer graphics, the total light intensity that reaches the eye is usually given as
I = Id + Isp. Physically, however, light intensity decreases with distance according to an inverse square law,
𝑘𝐼
so that the intensity of light reaching the eye is 2, where D is the total distance that the light travels from its
𝐷
source to the surface and then to the eye, and k is the proportionality constant. Let’s just take k to be 1.
Suppose that a light of intensity 0.800 is located at S(2, 4, 3). The viewer’s eye is at E(5, 7, 6) observing the
point P(1, 2, 0.989) on a chrome surface in the shape of z = sin(2x + 3y). For chrome the diffuse reflection
coefficient is commonly set to 0.400, the specular reflection coefficient is 0.775, and f is 76.8. Calculate the
intensity of light reaching the viewer’s eye, using the inverse square law for distance.
This description of lighting is adapted from Hill, F. S., Computer Graphics Using OpenGL, Prentice-Hall,
Second Edition, 2001.
Download