Playing with loops

This week for Computational Media, we learned about loops and conditional statements. And for our assignment, we had to use these loops and conditional statements in order to create a simple algorithmic design. I feel like my previous projects have been pretty juvenile so far, so I wanted to create something a bit minimal with few lines of code that would turn into something a little crazy. I ended up making the shape below:

The slider was actually more challenging than I had anticipated. I first used mouseDragged, but I couldn’t get the slider to function in the way that I wanted it to. I was glad to have found the slider example in our class notes, and I used that to create my own. Once my slider was implemented, I used the slider value to manipulate the for loop that builds and colors the triangles.

This code is pretty easily customizable, so I’ve commented out some rects and lines that made the design rather busy. I like how the slider gets more chaotic as the slider’s value increases. Here’s an example with the other shapes included at complete chaos.

Combining the two

As part of our assignment, we had to work together with a partner to try and combine sketches. I worked with Richard Lapham, who used arrays to create a really cool pattern with ellipses. I added my slider to control the color of his ellipses. Ultimately, I ended up not putting my triangles in our combined sketch, as I thought it was way too chaotic of a sketch.

Working with two people was pretty fine with me. Both Richard and I had busy weekends and could not meet up to work. However, with the help of Slack, coordinating and collaborating on this code was actually pretty easy. Having worked at HipChat in the past, it pains me to say that Slack helped, but I definitely know first-hand how great these communication tools can be for collaborating on code.