liveBook · Manning

Cell

As explained in Geometry for Programmers

A grid cell is an elementary bounded region of a regular spatial grid used to organize sampled values and geometric reconstruction.

A cell is a small, bounded region in a regular spatial grid. Surface-reconstruction algorithms divide space into cells so each region can approximate part of a curve or surface within an agreed error. Smaller cells usually improve accuracy, but increase processing and memory costs. section 11.3.1 section 11.3.2

Cells provide the local structure used by contouring algorithms:

  • Marching cubes assigns a surface configuration to each cell from the inside/outside signs at its corners. section 11.3.1
  • Marching squares places line segments in two-dimensional cells where neighboring grid values change sign. section 11.3.1
  • Dual contouring connects points associated with neighboring cells and moves them toward positions that better fit the modeled curve. section 11.3.2

Approximating a circle

Place a circle’s signed distance function on a fine two-dimensional grid. Each cell records the signs at its corners; cells whose corners straddle the sign change receive contour segments. Refining the grid makes the polygonal approximation more accurate, while increasing the number of cells to process. section 11.3.1

Figure 11.21 Now the contour line segments run from and to cell centers.
11-21

Use the figure to see how dual contouring connects neighboring cell centers rather than placing segments only along cell borders. section 11.3.2

How Geometry for Programmers covers it

How deep it goes
Defines cell size, corner-sign configurations, and center-based connections, but stops short of general grid data structures.
Examples
Uses circle, sphere, rectangle, and metaball reconstructions to show cell-based contour approximations.
What it assumes
Assumes signed distance functions, inside/outside signs, and basic contouring, while illustrating them through circles and grid cells.
What you can do after
Apply grid resolution and corner-sign information to reason about contour accuracy and computational cost.
How it connects
Connects cells to signed distance functions, marching cubes, marching squares, contours, and triangle meshes.

Also explained in

Compare how 5 books explain cell →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Geometry for Programmers. The section links point to the parts of the book it draws on.