simple fractals with python and Tkinter

Matthew Wilson mwilson at sarcastic-horse.com
Fri Oct 10 16:25:06 EDT 2003


Hi-


I've been goofing off with some basic recursive landscape generating
stuff, drawing the output to a tk window.  You can run the program like
so:

from pts import *
>>> draw(5) #will create a grid of 4 ** 5 number of colored tiles.

Each tile is colored based on the heights of its neighbors.  Anyway, maybe
somebody here would enjoy goofing off with this stuff like I have.

The program is available here:

http://www.sarcastic-horse.com/landscape/pts.py

It's unfinished, but it does draw crude pictures.  Be careful about the
size of the numbers you feed it. 4 ** 7 took about 120 seconds to compute.

There's something weird happening with where you call it from.  In IDLE, I
hit F5, then type draw(4) and the image pops up ok.  Otherwise, nothing
happens.






More information about the Python-list mailing list