This is a little toy I wrote in Processing 4 to generate some fairly nice imagery.
void setup()
{
size(640, 480);
}
void draw()
{
int spacing = 20;
background(0);
for(int x = 0; x < width; x += spacing)
{
for(int y = 0; y < width; y += spacing)
{
float r = random(1);
stroke(random(255), random(255), 255);
if(r < 0.5)
{
line(x, y, x + spacing, y + spacing);
} else
{
line(x, y + spacing, x + spacing, y);
}
}
}
noLoop();
}
Leave a comment