Readme: Final Project - CSE 167 - Student: Ivan Ospina
Instructions
Download FinalProjEXE.zip
Unzip FinalProjEXE.zip.
Then run FinalProject.exe.
Use WASD to move, and use the arrows to look around.
Description
I made a room with a TV and a matress in them which cast shadows on the floor and the walls. The positional light in the room swings, so the shadows move.
It was hard to fine tune the polygon offset to work right for the shadows that meet in the corner of the room. So there are certain angles you can view from where the shadow from one wall is visible through the other wall, but only a little bit.
Algorithms
Shadows
I used the projection matrix from the book. Since that one is assumes that the light is along the y axis, and the shadow is projected onto the xz plane, I made a different matrix for each wall, and translated the shadow to the appropriate position.
Swinging light
I used the equation for a pendulum to get the angular acceleration for a given angle.
Back to pictures