Pictures from Stanford
CS148: PacMan

Getting together what I learned in cs148, I wrote a Pac Man game as final project. It was simple, but fun :-)
I found the texture part, in this case the face for pacman, most interesting:
- First you need a 2d matrix, the texture representing a color for each pixel. In my case that's a 128x128 pixel smily.
- Next a matrix transformation (2d->3d) to map the color pixel on the 3d object (as shown in the picture below).
- Lastly another transformation (3D->2D) brings the color from the object back to the view port. Which is again a 2d matrix, namley the monitor.
Of course you do the math in reverse order. To get the right pixel of the texture, to the right pixel on the the screen.
Well at least I thought that's pretty cool stuff.

Patrick
Movies
TU Wien