Interactive Poster Video and Code:
PFont myFont; void setup(){ size(1024,768); background(215); strokeWeight(2); } int valueR=11; int valueG=151; int valueB=255; void draw(){ for(int y=0; y<height; y=y+100){ for(int x=0; x<width; x=x+100){ fill(255, 251,0); stroke(0); ellipse(x,y,70,80); fill(valueR,valueG,valueB); stroke(0); rect(x-35,y+5,70,35); fill(255); strokeWeight(7); stroke(190); ellipse(x,y-10,30,30); fill(0); stroke(0); ellipse(x,y-10,5,5); } } fill(240); stroke(random(255), random(255), random(255)); triangle(212, 340, 512, 90, 812, 340); triangle(212, 428, 512, 678, 812, 428); fill(50); myFont = createFont("Impact", 33); textFont(myFont); textAlign(CENTER,CENTER); text("IMA Fall 22 End-Of-Semester Show", 512, 300); textSize(26); text("Location: 8th floor", 512, 230); text("Friday December 16", 512, 468); text("6pm to 8pm6", 512, 538); } void mouseDragged() { valueG = valueG+4; if (valueG > 255) { valueG = 0; } }
Recitation Tasks:
Task 1:
Coding this part was the first time I learned how to use for-loops, so when I figured out what my pattern was going to be (minions), I thought it was super cool in terms of how it displayed on the screen. Overall, I did not have any difficulties in this task.
Task 2:
I had trouble at first trying to randomize the colors of the minion’s overalls. When I first tested out the code, the colors of all the minions of the screen stayed the same. Although the color was still randomized, the color that popped up was the same for each minion. After a few tries through testing different coding examples from the slides and the processing website, I was able to apply and different random color to each minion. After that, I tried to figure out how to make the colors switch constantly through time, which was later found that I had to put the code within void draw().
Task 3:
Task 3 in my opinion was both the most interesting and struggling part. I struggled with what I wanted to do as an interaction. I knew I wanted the user to interact with the mouse, so I experimented with different mouse functions given on the recitation page. I coded with mouseX, mouseY, pmouseX, and pmouseY. All of which I did not like. The code worked, but I did not like how the movement of the mouse draw shapes on the screen that did not disappear. I wanted the minions to move, but it did not seem practical through that coding. Therefore, after a few more experimentations, I figured that I wanted to change the color graphics of the poster, so I tested out different color changing mouse interactions, and ended up with the code I pasted above. The outcome was super fun and fascinating!