Recitation 11: Objected Oriented Programming by Ellie Meng

Exercise:

Process: Since there was no time left to do our own coding in the recitation, I finish this code after class individually. As final approaching and many of my friends getting upset with all the dues piled up, I decided to make a pressure-releasing program that is simple but fun. I came up with the idea of drawing happy faces instantly because I’ve seen less and less smiling this week. So I started by drawing a happy face.

To make the smiling face seem more vivid and outstanding, I painted it red and drew a black sad face in comparison.

I planned to apply the new things I’ve learned in Object Oriented Programming workshop to make it interactive, I first decided to draw 100 black sad faces on the background and then use mousePressed() to add red smiling faces.

The only challenging problem I’ve encountered during the process was the application of curve() function. It was a really tricky one and making the curve in black face change the position while the position of the face changing randomly was a tough task. But fortunately, I got everything done myself by trying a few more times.

According to my own experience and some of my friends’ opinion after they played with this exercise, it could magically release us from tense studying for a moment and help reduce our pressure(though it could not change the fact that all work still need to be done).

Image:

Video:

Code:<script src=”https://gist.github.com/Ellie-1809/5bb6e5379c606c290f1c67fc67f0c339.js”></script>

Leave a Reply