Press escape to exit fullscreen

{{sketch.instructions}}

CC {{sketch.licenseObject.short}}

Archived Sketch

This sketch is created with an older version of Processing,
and doesn't work on browsers anymore.

View Source Code

Capture Screenshot

Fluid Simulation + Momentum Transfer + Electrostatic Force

{{$t('general.by')}}
Mouse-interactive fluid simulation with particles. The fluid simulation is solved on a 16x16 cell grid. Using Verlet integration for the particle update. Every particle has an electric charge and two of them have a static value. When any two particles collide, they equally share it. The border is the electric ground. There's a nonlinear friction and on every collision there's a tiny amount of 1% energy lost, so its passive state approaches a global lower limit energy. So far, the binding of the forces is one-way only and the particle motion doesn't add to the fluid simulation. Have fun!
We recovered an unsaved version of this sketch. Please review your changes below.

As a Plus+ Member feature, this source code is hidden by the owner.

  • {{co.title}}
    {{$t('sketch.mode-pjs')}} {{$t('general.learnMore')}}
    Select mode or a template
    {{liveCodeLink}}
    • {{l.url.substr(l.url.lastIndexOf('/') + 1)}}
    {{$t('sketch.layoutDescription')}}

    {{k.category}}
    {{k.label}}
    {{k.description}}

    {{$t('sketch.seeMoreShortcuts')}}

    Versions are only kept for 7 days.
    Join Plus+ to keep versions indefinitely!

    {{$t('general.joinPlus')}}


    {{$t('sketch.versionsSummarized')}}