ICM Week 5

This week we talked about defining our own functions, and tidying our code. While I slightly changed the look of my project from last week I made a lot of changes within the code to expand on what I was trying to do. I originally set out to make an interesting 10print example using triangles instead of diagonal lines. This week I implemented a for-loop instead of an if statement for the actual 10print horizontal printing functionality. I then wanted to further randomize things with some sort of user input. I thought using an object I call “color” would be a fun way to change things up. That way while it is printing different triangular shapes I used the mousePressed function to change the colors being printing. As I continue to expand on these ideas I will be making it more user interactive and intuitive how to change the shapes and the amount times it runs.

I also added a new argument to my printing functions called “times” which dictates how many times each function will run. This became interesting when I realized that if I call two functions in draw at the same time, the spacing would actually be different because they are being drawn together. This created crazier patterns and is an interesting idea to try and expand on in the future. Below are some examples of the resulting images and new code.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s