Week #13
Last week we all had to present our final project ideas in a short presentation. I wanted to work on a combination of spring simulations and using ml5's handpose model to create an experience that explores this type of interaction. It's a direct continuation of what I did in weeks #6 and #9.
I found playing around with physics simulations intriguing, because it gives you a sense of how things work — it has some inner logic to it, one you’re expecting, but then the fact that it’s simulated affords for experimenting and introducing less-than-real behaviors. So I’m interested in exploring combining these kinds of simulations with a type of physical interaction like using your own hands.
I started as suggested — by workin on different parts at the same time. I set out to recreate the whole thing, and hopefully in a way that will work in my favor when I reconnect it all.
I added boundaries to the spring and rewrote the class to have three types of behaviors: (1) Just a "regular" particle on a spring; (2) Particles that are currently being influenced (not quite done yet); (3) Locked "anchor" particles — these are the ones that are grab-able. I also added boundaries so that the anchors would bounce of off walls. I wanted people to be able to "throw" the particles on the walls, and that if the hand exits the screen the anchors would bounce of the exit point. I still have to account for that (there's an issue with the mouse where it gets out of boundaries).
I also tried to turn ml5's handpose into a class structure, which turned out to be way more complex than it should have been. I battled with the sizing of the video and the scaling again. I swear at some point it worked, but the next day it didn't and so I'm back to square one on this. The sketch file is relatively short and simple now as most of the functionalities are contained within the PinchTracker class. The biggest challenge here was in turning this into a class because it wouldn't let me reference the instance in that context through the callback function. I still don't fully understand this part — I got stuck and asked a friend for help — who eventually solved it by basically saying "_this = this;".
I then set out to combine the two sketches into one. This is a work in progress... There's still a lot to adjust and fix, not to mention the artistic and stylistic choices that I haven't started making yet. Hopefully I make it all work in time for next week!
Thanks for reading!