Skip to content

Floating bubbles

Assignment 2 for Nature of Code. Trying to simulate floating effect by creating gravity and buoyancy under the imaginative surface of water (in this case, the middle of the screen). 

This is a practice of simulating the second Newton’s law by applying acceleration to the particle’s velocity other than directly changing the velocity or location.

noc_force

Play applet at http://leejayxia.com/processing/noc_float/.

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*