Wednesday, September 19, 2018

Turtle Power!

Although I encounter devices running computer code every day in the music classroom, I usually do not stop to think about how a device does what it does. I have thought from time to time that it would be nice if I had an app that could do ______. But alas, my knowledge writing code and programing is limited to merely knowing about it or knowing that such a thing exists. I found it sort of funny that I was one of only a few people that had to download the "Java development kit" in order to get the Turtle Art application to run... I assumed it was because other people have had to download it previously for other programing projects, hah!

I found the application easy to use after only a few minutes of tutorial and then I was enjoying the sandbox nature of the program.

Drawing squares has never been so rewarding!
After playing around some more I felt like I had enough of a tenuous grasp on things to try and draw something inspired by a piece of art. 

I think I was equal parts inspired by my doodling to find a piece of art that reminded me as I was inspired to create and modify my program to emulate the artwork. 

The two methods sort of built upon each other and what seemed like a few minutes later(in reality a little more than an hour) I created an interpretation of this field of flowers!


ta-da!



I started writing the program to create a flower shape and then set the xy coordinates to random. I decided a smaller flower would create some balance and variety in the drawing so I wrote that in the code as well as a random color selector. I experimented with the "if-then" tabs and got the flowers to be drawn as 12-sided polygons if they were assigned a y-value greater than 0. I included two sizes to polygons in each of the two strands of shape producing code(one for medium and one for small. After some tweaking with the color palette a little bit I ended up with the result above. It's not a nuanced as the painting, but I think keeps in the spirit of the original work!

My next piece was inspired not by a piece of visual art but by a piece of music by Steve Reich. The piece is the 1st movement from his larger work titled Electric Counterpoint. 

The piece is minimalist and really drives home slight changes of periods time. The timbres, ryhthms 
and melodies are very angular which inspired me to choose the diamond as the theme that would repeat and change over time. 

I started writing the code to do a single diamond, then a row, then a second row and then the whole screen. I experimented with different kinds of repeating... offset, bigger, smaller, and then decided on the slowly evolving filling in of the interlocking diamonds. Like the piece before I played around with the color selector but this time I wanted more order and predictability so I used an equation to that(somehow) ended up filling in the diamonds with a uniform color each time the turtle added on. While the finished product is relevant to the inspiration, I think the full experience is running the code while the piece plays and watching the turtle draw to the music!

The Turtle's Process:





The .png files that include the code.



No comments:

Post a Comment