Demonstration of multiple forces acting on bodies. Bodies experience gravity continuously. Bodies experience fluid resistance when in “water”. (natureofcode.com)
The force calculations are performed using the p5.Vector class, including the createVector() function to create vectors.
Forces by p5.js Contributors and the Processing Foundation is licensed under CC BY-NC-SA 4.0.