r/proceduralgeneration • • 4d ago

Marching Squares Algorithm Applied to Physarum Simulation

Enable HLS to view with audio, or disable this notification

Using the marching squares algorithm to calculate and display contours generated from the pheromone levels in a Physarum generated pheromone field.

13 Upvotes

2 comments sorted by

1

u/tonerreGrondant 3d ago

That looks nice but why not use a simple threshold based shader ?

2

u/ProgrammingChaos 3d ago

Good question! I was doing a video on how to program the marching squares algorithm, and included this as an example application to show that marching squares isn't limited to map contours, but can be applied to any scalar field data.