1. 41
    1. 9

      This is fantastic writing. I didn’t know I needed triangulation so much in my life.

    2. 3

      I’m now actually curious esp. how you did the “chalk” drawings :) And also the 3d surfaces, they look cool too :)

      1. 4

        The chalk drawings are just static images (I drew them with Procreate on an iPad). I was going to render them all consistently, but in order to finish I cut some corners. I don’t think it would be too hard to make a chalk shader, but it would require building a vector editing tool or something because it took too long to place all the points in code. :)

        1. 3

          And how about the 3d surfaces? Did you draw them from code pixel by pixel, or with some tools?

          1. 5

            Ah, all the live visualizations are rendered with webgl. The terrain and parabaloid are basically the same shader, although the terrain has dynamic lighting and the parabaloid doesn’t. I could unify them…

            The trick to the effect — that fake dithering look — is that every other pixel has less color depth than the pixels next to it. So half the pixels are full color, the others are like 16-bit (or something). Basically just chops off the bottom few bits of the RGB values of every other pixel. I played with some actual dithering patterns, but I liked the look of this a lot, and it’s really simple to code.

    3. 3

      I just wanted to add that this is one of the best math/algorithm article I’ve read in a really long time. And with really great visual support.

    4. 3

      Long time lurker, first time commenter. Amazing post, I might just try implementing Delaunay Triangulation myself.

    5. 3

      Great article.

      Interesting to note that the Stolfi of the work cited is the slightly controversial Jorge Stolfi, current bane of crypto scammers.