A method corrects an adaptively sampled distance field of a model. The adaptively
sampled distance field includes a multiple of cells. Each cell stores distance
values at vertices of the cell. The cells include interior cells, surface cells,
and exterior cells, and neighboring cells have a common edge. Selected cells are
marked as unprocessed cells, and the surface cells as marked as processed cells.
A particular vertex of each unprocessed cell is marked as a minimum vertex if it
has a minimum absolute value distance value. The unprocessed cells in an ascending
order of the minimum vertices are further processed by appending, for each common
edge of each unprocessed cell, distance values of neighboring processed cells to
the common edge, adjusting the distance values of the vertices of the unprocessed
cell according to the appended distance values of the edges and the distance values
of the vertices, and marking the unprocessed cell as processed.