# Week 3

• Show Sketch
``````/** @peep sketchcode */
size(200, 200);
int y = 20;
for (int x = 20; x < width; x += 20) {
rect(x-5, x-5, 10, 10);
}``````
• Show Sketch
``````/** @peep sketchcode */
size(200, 200);
for (int y = 20; y < height; y += 20)
{
for (int x = 20; x<= y; x += 20)
{
rect(x-5, y-5, 10, 10);
}
}``````
• Show Sketch
``````/** @peep sketchcode */

size(200, 200);
beginShape();
for (int x = 5; x <=200; x++)
{
if (x % 15 && 5)
{
vertex(x, 50);
}
else
{
vertex(x, x/2);
}
}
vertex(5,200);
endShape(CLOSE);``````
• Show Sketch
``````/** @peep sketchcode */
size(200, 200);
smooth();
strokeWeight(20);
noFill();

bezier(0, random(height), 0, random(height), width, random(height), width, random(height));
bezier(0, random(height), 0, random(height), width, random(height), width, random(height));
bezier(0, random(height), 0, random(height), width, random(height), width, random(height));
bezier(0, random(height), 0, random(height), width, random(height), width, random(height));
bezier(0, random(height), 0, random(height), width, random(height), width, random(height));``````
• Show Sketch
``````/** @peep sketchcode */
size(200, 200);
background(0);
stroke(255,60);
for (int i = 0; i < width; i++) {
float r = random(width/10);
strokeWeight(r);
float offset = r * 5.0;