This demonstration captures my take on creating a fluid simulation. I wanted to experiment with  physical properties (attractive & repulsive forces and flow) and combine it with a visual form.

Implementation:

Each droplet is approximated as a small sphere. Frequent checks are performed to identify  neighboring drops within an appropriate range--this is dependent on the size of the droplet--and a triangle is rendered between them.

The process is optimized using events to routinely trigger checks from each droplet. Neighboring droplets are then sorted by angle to ensure that appropriate vertices are selected for each triangle. This ensured a more realistic-looking appearance and that excess triangles are not rendered between further drops.

Physics:

The application of physical properties on each droplet created more predictable and orderly behavior. Droplets are solid, so they are incompressible, like water. Furthermore, the addition of adhesive and repulsive forces influences ideal spacing between droplets.


Leave a comment

Log in with itch.io to leave a comment.