View Source:jacksonPollock.php

http://www.lewislacook.com/phpainting

—just in case you want to roll your own



<?php

/*
phpainting #1
by Lewis LaCook
July 2004
==generates psudo-random dynamic PNG==
*/
srand((double) microtime()*1000000);
//set up image
$heightd0;
$widthH0;
$rgbRange0=rand(0, 255);
$rgbRange1=rand(0, 255);
$rgbRange2=rand(0, 255);
$rgbRange3=rand(0, 255);
$rgbRange4=rand(0, 255);
$rgbRange5=rand(0, 255);
$rgbRange6=rand(0, 255);
$rgbRange7=rand(0, 255);
$rgbRange8=rand(0, 255);
$rgbRange=rand(0, 255);

$im=ImageCreate($width, $height);
$color[0]=ImageColorAllocate($im, $rgbRange0, $rgbRange5,$rgbRange8);
$color[1]=ImageColorAllocate($im, $rgbRange4, $rgbRange3, $rgbRange5);
$color[3]=ImageColorAllocate($im, $rgbRange8, $rgbRange2,$rgbRange1);
$color[4]=ImageColorAllocate($im, $rgbRange0, $rgbRange8, $rgbRange7);
$color[5]=ImageColorAllocate($im, $rgbRange5, $rgbRange8,$rgbRange6);
$color[6]=ImageColorAllocate($im, $rgbRange9, $rgbRange8, $rgbRange5);
$color[7]=ImageColorAllocate($im, $rgbRange5, $rgbRange1,$rgbRange8);
$color[8]=ImageColorAllocate($im, $rgbRange6, $rgbRange6, $rgbRange7);
//draw on image
//canvas
ImageFill($im, 0, 0, array_rand($color));
//numbers for pixels and lines to randomly seed by
$manifest1= rand(0, 1000);
$manifest2= rand(0, 9000);
//pixels
for($i=0; $i <= $manifest2; $i++){
imagesetpixel($im, rand(0, 480), rand(0,640), array_rand($color));
}
//lines
//dashed
for($x=0; $x <= $manifest1; $x++){
imagedashedline($im,rand(0, 480), rand(0,640),rand(0, 480), rand(0,640),array_rand($color));
}
//filled
for($x=0; $x <= $manifest1; $x++){
imageline($im,rand(0, 480), rand(0,640),rand(0, 480), rand(0,640),array_rand($color));
}
//output image
Header("Content-type: image/png");
ImagePng($im);
//clean up
ImageDestroy($im);

?>




***************************************************************************

Lewis LaCook

net artist, poet, freelance web developer/programmer

http://www.lewislacook.com/

XanaxPop:Mobile Poem Blog>> http://www.lewislacook.com/xanaxpop/

Stamen Pistol: http://stamenpistol.blogspot.com/

Cell:440.258.9232

Sidereality: http://www.sidereality.com/

























———————————
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!