Alex Wallpaper
For this assignment, I had trouble thinking of an end result so I just tweaked around with different numbers and variables. I started off with the template. Then, I decided to change the size of the rects and add a gradient of color to them. Then, I began playing around with the number in “gridSize”. I found that as the number in creased, the amount of rects decreased and vise versa. So I set the size to 10 and a beautiful patterning occurred with the lines. So, I decided to add random coloring to the lines and rects. However, I switched the green and blue variables in the rects and found that different colors appeared for the lines and the rects. I then proceeded too add ellipses and messed around with their size so many times until I got the interesting randomized striations.
size(600,300);
background(0);
int gridSize = 10;
float r= random(0,255);
float g= random(0,255);
float b= random(0,255);
for (int x = gridSize; x < = width - gridSize; x += gridSize) {
for (int y = gridSize; y <= height - gridSize; y += gridSize) {
float p= random(0,600);
noStroke();
fill(x*r,b,g);
rect(x-1, y-1, 10, 10);
stroke(r*x,g,b);
line(x, y, width/2, height/2);
fill(0);
ellipse(p,y, x,2);
}
}
fill(0);
noStroke();
rect(0,0, width/2, height);