Processing
W9 Processing
http://hello.processing.org/
this week's assignment is to create a digital art piece using code.
in the hour of code tutorial i made an alien face using static rectangles and circles.
i also learned how to assign colors to the background, the strokes and fill.
for the assignment i decided to make an abstract art piece with my mouse. i like the idea that when my mouse moves, shapes move along/in opposite directions as my cursor.
here's my abstract art piece with rectangles and circles:
i also tried to embed the letters Q and E in my piece (see if you can find them). Q and E are two keys that i recently used a lot in PUBG (a multiplayer game).
and here's the code i used:
void setup() {
size(500, 400);
background(90, 160, 180);
}
void draw() {
if (mousePressed) {
background(10, 80, 100);
}
stroke(200, 150, 55);
fill(260, 220, 90);
ellipse(mouseX, 200, 100, 100);
fill(200, 100, 150);
rect(100, mouseY, 20, 200);
fill(200, 100, 150);
rect(130, mouseY, 20, 200);
fill(200, 100, 150);
rect(160, mouseY, 20, 200);
fill(200, 100, 150);
rect(190, mouseY, 20, 200);
fill(200, 100, 150);
rect(220, mouseY, 20, 200);
fill(200, 100, 150);
rect(250, mouseY, 20, 200);
fill(200, 100, 150);
rect(280, mouseY, 20, 200);
fill(200, 100, 150);
rect(310, mouseY, 20, 200);
fill(200, 100, 150);
rect(340, mouseY, 20, 200);
fill(200, 100, 150);
rect(370, mouseY, 20, 200);
ellipse(mouseX, mouseY, 70, 70);
}
Comments
Post a Comment