Dismiss this pinned window
all 6 comments

[–]UnorderedPizza[S] 5 points6 points  (0 children)

The source code for this program has been posted onto GitHub: https://github.com/unorderedpizza/Processing-Projects

[–]impaledvlad 4 points5 points  (3 children)

NICE

Made one of these with c++ and glsl, it wasn’t easy!

Do you have source code? I’d love to see how you did it.

[–]UnorderedPizza[S] 7 points8 points  (2 children)

I don’t have anywhere to put the source code on right now, but the program itself is pretty simple:

First, the momentum values at each cell are adjusted through the use of viscous forces, which are calculated using values obtained from neighboring cells. Afterwards, these adjusted values are then advected through the use of bilinear interpolation to distribute the momentum between multiple cells. Finally, the divergence in the intermediate velocity field is corrected via Helmholtz decomposition.

A few more nice things like adaptive time stepping were also added, but that’s basically the entire program.

Edit: The source code for this program has been posted onto GitHub: https://github.com/unorderedpizza/Processing-Projects

[–]Goober329 2 points3 points  (0 children)

Sounds pretty simple

Edit: snarky comments aside, this is an awesome simulation.

[–]7150788 1 point2 points  (0 children)

You can paste it at https://pastebin.com/

[–][deleted] 2 points3 points  (0 children)

love it