Tuesday, September 24, 2019

Proessing Assignment 1


For this assignment, we had some practice with a coding program called Processing. It definitely felt like working in another language (I guess it is!). I ended up doing a pretty simple program in which a user can control whether there was a blank canvas or one of 2 shapes and backgrounds depending on if there was C, R or no key pressed

My code, click to enlarge


 

Some code that I had a hard time understanding is else. I suppose it didn't work here because it was unnecessary for it to work in order to have the 3 different screen states but I tried to implement it in lieu of the second if statement.
Another set of code that I wanted to use in the original program is the constrain feature, as I did not want the ellipse to grow past the canvas. There is only one example of constrain in the 7th chapter reading but I could not understand how to adapt it to my needs.

Otherwise, a simple but fun project that proves that I need more practice at coding.

No comments:

Post a Comment