Here’s another imaging example done with PHP – a Voronoi Diagram. I don’t exactly remember when I wrote this, but it was some time this year. The code doesn’t use any fancy, ultra-efficient algorithm, so it takes several seconds to make a medium-size image on my (old) computer.
The algorithm used is very simple: Iterate through each pixel of the image, and find which reference point it is closest to. Then, set the color of the pixel to the color of the reference point.
