First we must compute **V**,
which is the vector from the surface point to the View Reference
Point. Next we must compute the reflection vector **R**.
From the law of reflection: **L, N, **and** R**
are in the same plane, and in this plane the angle of incidence
equals the angle of reflection. We will look at two methods to
compute **R**.

There is also an approximation by James Blinn that is frequently used.

In the Phong method we assume the light
source is along the Z-axis, i.e., **L** = **K**.
So may have "2" light sources: 1 for diffuse (mobile)
and 1 for specular which is stationary.

Since **L, N**, and** R**
are co-planar, then **N** is a linear combination of**
L** and **R**, i.e. **N**= a**L**
+ b**R** Since **L** has no X or Y
component, the X, Y component of N is proportional to the X,Y
components of** R.** Thus it is co-linear in the X,
Y plane.

Therefore Rx = Nx Ry Ny angle between N, Z = q ==> Nz= Cos q

Note:

0 q p/2 (else light behind surface)N·L="Cos" q="nx·lx" + ny·ly + nz·lz="nx·0" + ny·0 +nz·1="nz"

angle between R, Z = 2q ==> Rz = Cos2q = 2 Cos2q - 1 = 2 nz2 - 1

Assume unit vectors

Now:

rx2 + ry2 + rz2 = 1 rx2 + ry2 = 1 - rz2 = 1 - Cos2 2q ry2 (rx2 / ry2 + 1) = 1 - Cos2 2q ry2[(nx2/ny2) + 1] = (ry2/ny2)(nx2 + ny2) since rx2/ry2=nx2/ny2 = (ry2/ny2)(1 - nz2) = 1 - Cos2 2q since nx2+ny2+nz2=1 = 1 - (2 Cos 2 q - 1)2 = 1 - (2 nz2 - 1)2 (ry2/ny2)(1 - nz2) = 1 - 4 nz4 + 4 nz2 - 1 = 4 n z2(1 - nz2) ry = 2 nzny (rx/ry) = [rx/(2nzny)] = (nx/ny) ==> r x = 2 nznx

Thus for a single light source along Z-axis:

rz = 2nz2 - 1 ry = 2nzny rx = 2nznx

Look at the geometry of reflection

The projection of **L** onto **N**
is **N** cos (q) so

R=Ncos(q) +SL+S=Ncos(q)S=Ncos(q) -LR= 2Ncos(q) -L= 2N(N · L) -L

There is also a method to approximate **V·R**,
developed by Jim Blinn. Blinn introduced ** H** = (**L + V**)
/ 2 and replaced **R·V** = cosq by **N·H**
= cos (q /2).
**H** is the normal to a perfect specular reflector
oriented such that the incident light is reflected to the viewer
(**V**).

Since, for small q, cos (q /2) raised to a power falls off slower than cos (q) raised to the same power, the net effect is that using the Blinn approximation "spreads" the specular highlight, as shown below.

The difference between using (a)**
R·V** and (b) **N·H **for a fixed value of
n. Note the difference in the intensity in the direction **V**.

We can compensate for this spreading by
using a larger Phong n value to narrow the specular highlight
back down. If we can use the approximation that the light source
and the View Reference Point are far away, so they don't vary
over the scene, then we can compute **L, V**, and **H
**once then the intensity at any point,** I**
= f(**N**).

Top of document.

Phong specular
reflection page.

HyperGraph home
page.