graph_icsGitHub
Guide chapters

Boundaries and filling

A boundary defines where the graph can grow. Filling asks the generator to search for more usable space, within the available node and attempt budgets.

Contours and holes

Use a GeoJSON Polygon or MultiPolygon. Border visibility and width style the outline; they do not change the allowed region or add collision padding.

Boundary Hidden

Same GeoJSON outline and hole. Border visibility, colour and width affect rendering; containment always uses the supplied polygon.

Same GeoJSON outline and hole. Border visibility, colour and width affect rendering; containment always uses the supplied polygon.

608 nodes of 650 requested. Stop: attempt_budget_exhausted. 198/200 occupied tiles; 99.9% of tile area has a node. This is a coarse coverage measure, not solid ink coverage.

JSON scene · YAML scene · SVG

Settings and command
graph-ics render --config docs/scenes/boundary-hidden.yaml --output examples/output/boundary-hidden.png
{
  "version": 1,
  "palette": "porcelain",
  "width": 600,
  "height": 360,
  "nodes": 650,
  "seed": 7,
  "growth": {
    "total_attempts": 35000,
    "refill_passes": 2,
    "coverage": {
      "tile_size": 30,
      "reseed_attempts": 1200
    }
  },
  "boundary": {
    "type": "Polygon",
    "coordinates": [
      [
        [20, 20],
        [580, 20],
        [580, 340],
        [350, 340],
        [300, 240],
        [250, 340],
        [20, 340],
        [20, 20]
      ],
      [
        [250, 70],
        [350, 70],
        [350, 150],
        [250, 150],
        [250, 70]
      ]
    ]
  },
  "boundary_style": {
    "visible": false,
    "width": 0.5,
    "color": "#527e9e"
  }
}

Boundary Fine

Same GeoJSON outline and hole. Border visibility, colour and width affect rendering; containment always uses the supplied polygon.

Same GeoJSON outline and hole. Border visibility, colour and width affect rendering; containment always uses the supplied polygon.

608 nodes of 650 requested. Stop: attempt_budget_exhausted. 198/200 occupied tiles; 99.9% of tile area has a node. This is a coarse coverage measure, not solid ink coverage.

JSON scene · YAML scene · SVG

Settings and command
graph-ics render --config docs/scenes/boundary-fine.yaml --output examples/output/boundary-fine.png
{
  "version": 1,
  "palette": "porcelain",
  "width": 600,
  "height": 360,
  "nodes": 650,
  "seed": 7,
  "growth": {
    "total_attempts": 35000,
    "refill_passes": 2,
    "coverage": {
      "tile_size": 30,
      "reseed_attempts": 1200
    }
  },
  "boundary": {
    "type": "Polygon",
    "coordinates": [
      [
        [20, 20],
        [580, 20],
        [580, 340],
        [350, 340],
        [300, 240],
        [250, 340],
        [20, 340],
        [20, 20]
      ],
      [
        [250, 70],
        [350, 70],
        [350, 150],
        [250, 150],
        [250, 70]
      ]
    ]
  },
  "boundary_style": {
    "visible": true,
    "width": 0.5,
    "color": "#527e9e"
  }
}

Boundary Bold

Same GeoJSON outline and hole. Border visibility, colour and width affect rendering; containment always uses the supplied polygon.

Same GeoJSON outline and hole. Border visibility, colour and width affect rendering; containment always uses the supplied polygon.

608 nodes of 650 requested. Stop: attempt_budget_exhausted. 198/200 occupied tiles; 99.9% of tile area has a node. This is a coarse coverage measure, not solid ink coverage.

JSON scene · YAML scene · SVG

Settings and command
graph-ics render --config docs/scenes/boundary-bold.yaml --output examples/output/boundary-bold.png
{
  "version": 1,
  "palette": "porcelain",
  "width": 600,
  "height": 360,
  "nodes": 650,
  "seed": 7,
  "growth": {
    "total_attempts": 35000,
    "refill_passes": 2,
    "coverage": {
      "tile_size": 30,
      "reseed_attempts": 1200
    }
  },
  "boundary": {
    "type": "Polygon",
    "coordinates": [
      [
        [20, 20],
        [580, 20],
        [580, 340],
        [350, 340],
        [300, 240],
        [250, 340],
        [20, 340],
        [20, 20]
      ],
      [
        [250, 70],
        [350, 70],
        [350, 150],
        [250, 150],
        [250, 70]
      ]
    ]
  },
  "boundary_style": {
    "visible": true,
    "width": 4,
    "color": "#a64152"
  }
}

Fill the available area

Area Fill

Area fill searches beyond the requested local tile populations; the node count is a safety cap. Compare stop reason and tile coverage, not just count.

Area fill searches beyond the requested local tile populations; the node count is a safety cap. Compare stop reason and tile coverage, not just count.

816 nodes of 2200 requested. Stop: attempt_budget_exhausted. 346/360 occupied tiles; 98.4% of tile area has a node. This is a coarse coverage measure, not solid ink coverage.

JSON scene · YAML scene · SVG

Settings and command
graph-ics render --config docs/scenes/area-fill.yaml --output examples/output/area-fill.png
{
  "version": 1,
  "palette": "porcelain",
  "width": 600,
  "height": 360,
  "nodes": 2200,
  "seed": 7,
  "growth": {
    "fill_area": true,
    "total_attempts": 100000,
    "refill_passes": 1,
    "refill_attempts": 10000,
    "coverage": {
      "tile_size": 25,
      "reseed_attempts": 3000
    }
  }
}

Population target

A target is not a promise. Every candidate must fit and the attempt budget is finite.

Nodes 60

nodes-60

Increasing the requested population fills more of the available canvas.

632 × 432; 60 nodes

Reproduce / SVG
graph-ics render --example sprawl --palette porcelain --nodes 60 --seed 7 --node-shape circle --edge-style solid --scale 1 --margin 16 --output examples/output/nodes-60.png
SVG

Nodes 180

nodes-180

Increasing the requested population fills more of the available canvas.

632 × 432; 180 nodes

Reproduce / SVG
graph-ics render --example sprawl --palette porcelain --nodes 180 --seed 7 --node-shape circle --edge-style solid --scale 1 --margin 16 --output examples/output/nodes-180.png
SVG

Nodes 480

nodes-480

Increasing the requested population fills more of the available canvas.

632 × 432; 480 nodes

Reproduce / SVG
graph-ics render --example sprawl --palette porcelain --nodes 480 --seed 7 --node-shape circle --edge-style solid --scale 1 --margin 16 --output examples/output/nodes-480.png
SVG

Small islands and narrow passages may not fit the selected geometry. Reduce node sizes and edge lengths, or increase the region size. More attempts can improve a bounded search but do not guarantee complete packing. Boundary following and terminal anchoring are experimental.

Coverage, budgets and experimental contour settings