ICM 5: Classes, Arrays & Koi Ponds

I felt very inspired after the last session on classes and object oriented programming - now I am able to create my own worlds and animate with a natural behavior. So powerful! 

I had the idea to create a real pond where digital Kois are floating "trapped" in their digital devices on the surface. The Koi will "live" in a sketch on the screen and push itself (and the iPhone) forward (I am planning to put motors underneath the floating phones) once it bounces against its digital wall. The audience can add their digital Koi to the swarm on the pond by loading the p5 sketch on their phones and let it float on the water - the new iPhones are waterproof ... The full swarm will be visualized in a different sketch on my website and users can drop fractions of Bitcoins into the virtual pond - like in a fountain. 

So lots to do in the next few weeks - but I feel so inspired. I want to build this installation.

IMG_1903.JPG

So I started writing down the different elements of my class "fish". How does it feel to be a Koi in a pond? Which elements should move? How can I create a natural, floating movement?

IMG_1904.JPG

I used the same construction mechanism as in the video. 

My beginnings were pretty simple - just a few lines that were moving. I created a skeleton for the fish and animated the fins and the body segments to move naturally.

Screen Shot 2017-10-09 at 12.09.20 AM.png

After a lot of iterations and tweaking of the random movements and the appearance of the body I had a working Koi object. I still have to work on multiple objects - they all show pretty much the same movements in sync. I want them to swim more independent from each other. Another point is the rotation. At the moment they all gravitate to the left as I cannot change the axis in a random manner. But so far I am happy with my Koi - it swims smooth and somehow natural after adding random noise to it.

I used the sketch as well for my fabrication project - a hacked book on data-visualization.