After spending a bit of time messing around with Processing, I slurped up Danc's Miraculously Flexible Game Prototyping Graphics for Small Worlds and the results can be seen below. You need Java to view this... and it's definitely not optimized at all.
Click to randomize the tiles!
Source code: cutetest