Am I free?

Social bookmarking

Delicious Bookmark this on Delicious

Flickr randomness

Badges and junk

Support The Commons

Valid HTML 4.01 Strict
Valid CSS!

The Flatland Renderer

In 102CR, we've begun to look at 3D graphics. The module aims to give students some experience with tools and techniques so that they're able to create things throughout the rest of the course. We cover theory as well, but not in huge amounts of detail at this stage.

This week we talked about the perspective transform and rendering.

I made this little demo of a flatland renderer to explain things visually. It's quite fun. Left and right move the position of the eye, up and down move the position of the screen.

It uses Pygame and Pyeuclid's Vector2. Don't complain about converting to Vector2 inside the intersect() function - I wanted to keep everything outside of that function simple and easily understood by the first-years.

Download: perspective_demo.tar.bz2