Nature of code — Vectors, Forces, Attractors and a little bit of Repulsion

©from the book “Nature of Code” by Dan Shiffman

Inspiration and research

The original version is even fancier.
The rectangle in Draw() function that hides all the particles’ trails. Without it, the picture gets quite scary.

My sketches

  1. I was thinking about the power of vectors basically after the final for ICM and Physical computing, where we used createVector() for the purpose of following the joints that Kinect gets from the detected body, and making the image of the bone to follow the joint accurately and ROTATE, creating the illusion of Xray. This week felt like the right time to look back at the code.
We also used vectors for debugging purposes. The whole idea of using vectors to help us to get the needed rotation belonged to my ICM professor Lisa Jamhoury.

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
EG

EG

More from Medium

React Router V6: Changes and Reflections

What are NFTS ? Does Creation and selling process is easy as it seems?

Using ReactJs for Web development has its advantages

reactJS web development services

Major Differences Between Web 2.0 and Web 3.0