Tornado

According to the snowstorm last Tuesday, the idea is to simulate the dynamic and seemingly chaotic movement of a tornado. I created a dynamic simulation of particles being influenced by both a flow field and an attractor point, which could be interpreted as simulating the behavior of debris or objects caught in a tornado. The ability to move the attractor with a mouse click adds an interactive element, allowing the direction of the tornado's path and observing the effects on the particles in real-time.

Flow Field:

  • Represents a grid of vectors that influence the direction particles move.

  • The direction of each vector is determined by Perlin noise, ensuring smooth variations.

Particle Movement:

  • Particles have properties for position, velocity, and acceleration.

  • applyForce adds a force vector to the particle's acceleration, simulating the impact of the flow field and attractor.

Attractor:

  • Simulates the tornado's core pulling objects towards its center.

  • The attract method calculates the force of attraction based on the distance between a particle and the attractor, mimicking gravitational pull.

Inspiration

Previous
Previous

Class 2 - Vector

Next
Next

Class 4 - Pendulum