I made a generative drawing algorithm that mimics my style of drawing and sketching, specifically using crosshatching.
The algorithm draws from a number of variables, including density, stroke width, wave amplitude, angle of progression, hatching tilt, hatch length, concavity, and more. Some of these variables stay constant, while others are actively changed as the algorithm plots the lines.
Here are my process sketches and documentation, some of which is conceptual and some technical:
The result is an incredibly robust and versatile function by the name of hatch(). Here’s my sketch and my code: