[thelist] Re: PHP - random image generation

Kelly Hallman khallman at wrack.org
Fri Jan 3 20:14:01 CST 2003


On Fri, 3 Jan 2003, Aleem Bawany wrote:
> > I'm new to PHP and computational design. Can anyone help get
> > me started on how to create the algorithm on this page?
> > http://humortree.shifk.com/projects/lines02/
>
> what follow is the code to generate the image, it's really simple
> and self explanatory. I figured I had to try this for myself...

Aleem, thank you for the great example code!

I made my own modifications and came up with something that
is a lot like the algorithm described at the original link.

In action: http://wrack.org/~khallman/gen1.php
The code:  http://wrack.org/~khallman/gen1.txt

If you use lines instead of fills you get my first attempt:
http://wrack.org/~khallman/gen2.php

Never done any gd library stuff before, great food for thought.
And, like so many things, very easy in PHP.  Thanks again!

--
Kelly Hallman
http://wrack.org/




More information about the thelist mailing list