matthias-research / pages

My web page containing all the demos from my youtube channel "Ten Minute Physics" www.youtube.com/c/TenMinutePhysics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug report: Eulerian Fluid Simulator in 200 lines of code

Habrador opened this issue · comments

I guess the intent is to display the fluid as white and the walls as black if you deactivate both the smoke and the pressure. To make that work the "var color = [255, 255, 255, 255]" has to be inside of the two for loops in "draw" method. Otherwise everything becomes just black.

I think there's also a bug in the SampleField method. If we sample from the bottom row it interpolates between the wrong values