So I was looking to simulate 2d ink diffusion (drop of ink in a soluble medium), and found that I should solve the diffusion equation and simulate using that.
While experimenting around, I made a cheap “solution” which simulates diffusion, but has some bugs. Could use some help with that please.
This code does indeed simulate diffusion, but the diffusion appears to happen only in the north-west direction. Any pixels to the north-east are unaffected.
The code seems to set the value of all 8 neighbours, so I don’t see what is causing the problem.
Hopefully you all could help me.
Thanks in advance.