Pastel Patterns

screen-shot-2017-03-02-at-1-03-06-amscreen-shot-2017-03-02-at-1-03-21-amscreen-shot-2017-03-02-at-1-03-29-amscreen-shot-2017-03-02-at-1-03-42-amscreen-shot-2017-03-02-at-1-03-49-am

int option = 1;
void setup() {
size(400, 300);
}

void draw() {
background(188,214,255);

if (option == 1) {
for (int x = 30; x <= width-30; x += 20) {
for (int y = 30; y <= height-30; y+=20) {
stroke(188,255,210);
strokeWeight(3);
line(x-5, y-5, x+5, y+5);
}
}
}

else if (option == 2) {
for (int x = 0; x <= width; x+=15) {
for (int y = 0; y <= height; y+=15) {
stroke(255,207,165);
strokeWeight(2);
line(x, y, width/2, height);
}
}
}

else if (option == 3) {
for (int x = 50; x <= width-50; x += 20) {
for (int y = 50; y <= height-50; y+=20) {
noFill();
stroke(255,247,181);
strokeWeight(2);
ellipse(x, y, 30, 30);
}
}
}

else if (option == 4) {
int count = 120;
for (int x = 20; x <= width-50; x += 10) {
for (int y = 20; y <= height-50; y+=10) {
stroke(255,207,165);
strokeWeight(1.5);
rect(x, y, 25, 25);
count–;
}
}
}

else if (option == 5) {
for (int x = 20; x < width; x += 30) {
for (int y = 15; y < height; y+=30) {
//rect(x-10, y-10, 22, 22);
stroke(188,255,210);
strokeWeight(3);
line(x, y, x,y);
}
}
}
}
void mousePressed() {
option++;
if (option > 5) option = 1;
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s