gridify_cmds
function gridify_cmds(D, parameters): Generator<CMDSStep, void, undefined>;Defined in: cmds.ts:206
Removes overlaps with constrained MDS (Liu, Hu, North & Shen, Computer Graphics Forum 37(1), 2018), then snaps the result to a grid.
Alternates stress-majorization updates with rebuilding the Delaunay
proximity graph, augmented with edges for overlapping pairs, until every
item is inside Gamma with no overlap. If a run does not converge the grid
grows by a row or column and the nodes shrink (§4.2).
Yields each intermediate layout, so callers can animate the optimisation; the last yield is the grid-snapped result. Note that a run which stops with overlaps left can snap two points into one cell, and that coincident input points produce non-finite output.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
D | readonly Point[] | Input points. |
parameters | CMDSParameters | - |
Returns
Section titled “Returns”Generator<CMDSStep, void, undefined>