Triangle lines

 from Red Blob Games
25 Nov 2019

Click Animate and then Random:

Or play with the first two sliders for the pattern and layout, and the others for style. This was inspired by watabou’s post about triangle hatching[1]. I wanted to try implementing it with shaders, using the patterns from this experiment of mine, and then developing more. However, I got distracted by all the cool patterns I found, and never got back to hatching…

 1  How this works#

First step is to scatter some points around. Second step is to run Delaunay Triangulation on them. Then paint a texture inside each triangle: Optionally rotate the triangle to face a specific direction.

 2  More#

There’s always more ideas but I ran out of time, so I wrapped up and moved on.

Source: triangle-lines.js

Email me , or tweet @redblobgames, or comment: