r/creativecoding • • 5d ago

Marching Squares Algorithm Applied to Physarum Simulation

Enable HLS to view with audio, or disable this notification

9 Upvotes

4 comments sorted by

1

u/[deleted] 3d ago

[removed] — view removed comment

1

u/ProgrammingChaos 3d ago

I've played a bit with different opacities, but not fully coloring the regions. That sounds like it would be very cool. The original version was done on a noise map to create a true topographical map. This version does have interpolated edge crossings. In the programming video it's based on: https://youtu.be/P45S7-OTrSE?si=b-rNFfXOHhGt19Ab I walk through programming both midpoints and interpolation.

0

u/[deleted] 3d ago

[removed] — view removed comment

1

u/ProgrammingChaos 3d ago

That is a great idea. Although the one thing I didn't do in the video was filter out the line segments into the separate closed forms. It's not too much extra work, but dealing with closing the shapes that intersect with the window edges is a bit of a pain. I was surprised at how much smoother the interpolated version was even with very small cells sizes.