coarsen the grain boundaries by keeping only every n-th vertex
Description
Dissolves boundary vertices regardless of shape, keeping every n-th one along each chain. Junctions stay exactly where they are, so which grains touch, and where, is unchanged, and the grain polygons are retraced along with the boundary.
This is the blunt instrument - it thins a straight run and a corner alike. Prefer simplifyBoundary, which spends its vertices where the shape needs them.
Syntax
grains = reduceBoundary(grains)
grains = reduceBoundary(grains,n)Input
| grains | grain2d |
| n | keep every n-th vertex (default 2) |
Output
| grains | grain2d |
See also
grainBoundary.reduce grain2d.simplifyBoundary grain2d.refineBoundary