p5  Gravity ball performance

Channel:
Subscribers:
815
Published on ● Video Link: https://www.youtube.com/watch?v=9ebpn1WrrzE



Duration: 0:00
12 views
0


This program is a simulation where particles move in an orderly manner under the influence of gravity. Initially, both the particles and the attraction points are placed randomly. There are multiple attraction points, and the mouse position dynamically affects the movement as well, making the particle motion adaptive to the environment.

Each particle has velocity and acceleration, starting with a slow, random movement. However, through gravitational calculations, they are drawn toward the nearby attraction points. The force is stronger when the distance is shorter and weaker when farther away, resulting in curved trajectories rather than straight lines. To further smooth the motion, friction is applied to the velocity, preventing sudden changes in movement.

Perlin noise is also utilized to control the particles' behavior. Unlike pure randomness, Perlin noise changes continuously over time, creating a flowing and natural motion. Additionally, each particle has a different color and size, introducing visual diversity and dynamic movement on the screen.

As a result, this simulation is not just random movement but a well-structured system where attraction, friction, and noise work together to create an environment in which particles move in a coordinated and dynamic manner.