




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





Computer Science and Electrical Engineering Dept.
West Virginia University
2nd October 2006
(^1) Planar reflections
(^2) Planar shadows
Planar reflections
For reflections in some other plane, transform that plane to the y=0 plane,
reflect, and transform back. If the plane is defined by a point, p , and normal n.
Translate the plane to the origin : T (โ p ).
Rotate so that n is parallel with the y-axis : R (ฮธ, v ).
I (^) ฮธ = cosโ^1 ( n ยท e 2 )
I (^) v = n ร e^2 || n ร e 2 ||
Scale about the y-axis by factor -1 : S(1, -1, 1).
Apply inverse rotation: R
โ 1 (ฮธ, v ) = R (โฮธ, v )
Translate back to original position: T
โ 1 (โ p ) = T ( p )
The complete transformation for a plane in general position is
q
โฒ = T ( p ) R (โฮธ, v ) S ( 1 , โ 1 , 1 ) R (ฮธ, v ) T (โ p ) q
Planar shadows
We can use a matrix to form the shadow of an object cast on a plane.
( lx , ly ): light position
( vx , vy ): object vertices
( px , py ): shadow vertices
Planar shadows
Using the same analysis we can get an equation for pz in terms of vz.
pz =
lyvz โ lzvy
ly โ vy
Since we are computing the shadow for the y=0 plane, py = 0.
Consider the equation:
ly โ lx 0 0
0 0 0 0
0 โ lz ly 0
0 โ 1 0 ly
vx
vy
vz
1
lyvx โ lxvy
0
lyvz โ lzvy
ly โ vy
Note : this is not an affine transformation.
Planar shadows
After the perspective division process
x
y
z
w
x / w
y / w
z / w
1
We have
Mv =
lyvx โ lxvy
0
lyvz โ lzvy
ly โ vy
lyvx โ lxvy ly โ vy
0 lyvz โ lzvy ly โ vy
1
So M is the shadow projection matrix
M =
2
6 (^64)
ly โ lx 0 0 0 0 0 0 0 โ lz ly 0 0 โ 1 0 ly
3
7 (^75)