Sierpinski Triangle

Here's a bit of Python to generate Sierpinski triangles using the "chaos game" method, an iterated function system (IFS). The code makes use of the Python Image Library (PIL) and can be downloaded here.