Triangle lines

from Red Blob Games
25 Nov 2019

Table of Contents

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.

Play with the first two sliders for the pattern and layout, then customize the output with the others.

 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: