Forces

This week is all about forces

velocity acts on position, acceleration acts on velocity.

I adjusted my random walker from last week to use these. It is no longer a random walk, so I might need to change the terminology.

But essentially, I have initialised two groups of bodies that have forces acting upon each other. And then repeated them 4 times to go around contained within my margin. Attraction function was adapted from the textbook

forces.gif

Let’s increase the number of bodies -

forces (1).gif

Even further beyond!

forces (2).gif

Code - https://editor.p5js.org/sairamved/sketches/cMZRzDVHJ