Marching squares is a computer graphics algorithm that generates contours for a given two-dimensional scalar field.
This is a simple implementation of that algorithm using Python and matplotlib for visualization.
Nine different sets of points are shown in video. The first four configurations are formed from predefined shapes, whereas the last five consist of points initialized at random.
For every configuration a sequence of 4 images are shown; the points, the contours and the filled polygons with and without points.
Sources:
en.wikipedia.org/wiki/Marchin...
Source code:
github.com/SebastianBitsch/ma...
13 июл 2022