Random Walk USA
A random walk draws lines across a map of the United States, with each state’s shape filled by an organic, procedural scribble. The walker starts at each state’s centroid and moves in a random direction, using a point-in-polygon test to stay within the state’s boundaries. Use the mousewheel or the GUI controls to adjust the angle, density, scale, and smoothness of the walk, producing effects ranging from geometric grids to fluid sketches. Rendered on canvas with D3’s AlbersUSA projection, the example also offers preset styles such as Sketch, Geom, Squares, Triangles, and Random, plus a colorful palette to distinguish states.
AI-generated descriptionCreated by Christopher Manning
Summary
This is an experiment using a random walk to draw shapes. Adjusting theta results in a very organic or procedural drawing. The random walk stays in the geometry by using a point in polygon test.
Controls
- Use the mousewheel to adjust the angle
References
forked from <a href='http://bl.ocks.org/christophermanning/'>christophermanning</a>'s block: <a href='http://bl.ocks.org/christophermanning/8203750'>Random Walk USA</a>