Computing Atlas

How Computing Was Built
Sign In
Text size
100%
Theme
Algorithm

Marching Squares Algorithm

Computational Geometry Algorithm

Marching squares is a computer graphics algorithm that generates contours for a two-dimensional scalar field arranged as a rectangular array of values, producing either isolines that follow a single data level or isobands that fill the area between isolines. It processes each cell of the grid independently, computes a cell index by comparing the contour level with the values at the cell's four corners, uses a pre-built lookup table keyed on that index to determine the output geometry, and applies linear interpolation along the cell boundaries to place the contour precisely. Typical applications include the contour lines on topographic maps and the isobars on weather maps.

Connections

In Field

Source Marching squares (Wikipedia)
Sources
Marching squares (Wikipedia)
  • In Field: Computer Graphics, Lead
    In computer graphics, marching squares is an algorithm that generates contours for a two-dimensional scalar field (rectangular array of individual numerical values). A similar method can be used to contour 2D triangle meshes.
  • In Group: Triangulation, Voronoi and Mesh Algorithms, Lead section
    algorithm that generates contours
View the Source
Comments (0)
No comments yet. Be the first to share a thought.
Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.