Hello all! I have recently seen beautiful visuals of physarum and read an article written by Sage Jenson on implementing physarum simulations. Here is the link: https://sagejenson.com/physarum
As a challenge to myself, I tried to implement it myself as well. I’ve been slowly warming up to writing shaders and wanted to also include the GPU as part of the process. With that in mind, this was the flow I came up with:
- Sense Trailmap
- Move particle
- Deposit on Trailmap
- diffuse trailmap
- decay trailmap
- render trailmap
The reason for this split is because I’m using a machine which only supports openGL 2.1 and I haven’t quite gotten the hang of processing particles on the GPU yet.
Here is my code: https://github.com/chosamuel/openframeworks-physarum
The code works and there are no errors. However, it is not behaving the way I’d like it to. Running the simulation, you can see that many particles move in parallel motion, instead of having its own independent movement. I can’t seem to figure out why this is the case.
So, if anyone is kind enough to review my code, I’d be really grateful! All tips, including on the way I implemented it, are welcome, as I’m relatively new to openframeworks