Dyson Hatching

from Red Blob Games
21 Nov 2019

Table of Contents

Inspired by watabou’s post about Dyson Hatching[1], I wanted to try implementing it myself. Play with the settings. Drag a square image onto the diagram:

Shapes shape =
size =
Lines
brush strokes =



Other

 1  How this works#

First step is to scatter some points around. Second step is to generate cell boundaries:

Then paint a brush stroke at each point: , optionally clipped to the cell boundary.

 2  More#

More things to try:

  1. For voronoi/cellular I render by clipping the lines. It would look better if I instead clipped the endpoints to the polygon, then render the lines unclipped. That way the line caps would show properly.
  2. Try varying the number of lines instead of the spacing between them. That way larger cells will receive more lines instead of widely spaced lines.
  3. Add rendering of dungeon rooms. I can either pick the seed points that are close the walls and render their hatches (clipping to not draw over the rooms), or I can make a distance field with a gradient so that areas far from the walls become transparent.

Source: dyson-hatching.js

Email me, or tweet @redblobgames, or comment: