Question: I need help, using proccesing 3 code, on how to clear Berts face and display Erins when the mouse is clicked. Bert and Ernie are
I need help, using proccesing 3 code, on how to clear Berts face and display Erins when the mouse is clicked.
Bert and Ernie are good friends who just got their pictures taken, and now they want to see them. Your job is to write a Processing program that will allow the user to flip back and forth between the picture of Bert and the picture of Ernie. When your program starts, it should display a picture of Bert's face. Whenever the user clicks the mouse, it should display Ernie's face (if Ernie's face was already displayed, well then it should keep displaying Ernie's face). Whenever the user presses any key, it should display Bert's face (again, regardless of whether Bert's face was already being displayed). In this way, the user can toggle back and forth between the pictures of Bert and Ernie as many times as they like. Your pictures of Bert and Ernie need not look exactly like the sample, but you should make a reasonable attempt at aesthetic appeal. We are aware their hair doesn't look great. Hair is hard! Hint: You may find the strokeWeight () function useful to draws lines of different thickness. Fiqure 2: Picture of Bert (left) and Ernie (right)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
