# Assignment 2 - Mathematics

Développement de logiciels

14 déc. 2013 (il y a 5 années et 4 mois)

109 vue(s)

MATH
225

Calculus II
I

Dr. Ed Donley

Assignment
2

Due
Wednes
day, 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 you
r

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 gr
oup 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 li
ght 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(2
x

+ 3
y
).

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 b
e 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
I
s

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
I
d

=

I
s

c
d

cos

d
, where

d

is the angle between

and
n
. The vector
n

is normal to the surface

and

c
d
, the diffuse re
f
lection coeffi
ci
ent,
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 calculate
d

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
I
sp

=
I
s

c
sp

(cos

d
)
f

where
c
sp
, the specular reflection coefficient,
depends on the shinin
ess of the surface and
f

>

1 determines how focused the highlights are. Highlights are
f

is small.

In computer graphics, the total light intensity that reaches the eye is usually given as

I

=
I
d

+
I
sp
. Physically, however, light intensity decreases with distance according to an inverse square law,
so that the intensity of light reaching the eye is

, 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)
. T
he
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
(2
x

+ 3
y
). 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.