Hefezopf

by jens
See Code Download Embed
A quick experiment how to draw a 3-strand braid using separate sprites, to answer a question from my friend Ron Eglash.

Here's what astonished me: In order to trick the "painter's algorithm" into giving the impression of interweaving strands the order in which the sprites get to draw their next segment needs to be carefully orchestrated. I first tried this step-by-step by clicking on pieces of code. When I finally succeeded the sequence I got was this: ABCCABBCA. This is when it dawned on me why Ron had given me this problem: It's a so-called Latin square, something the Swiss mathematician Leonhard Euler obsessed over. Of course, the magic code has been in use since forever in indigenous cultures, especially in Africa.

I've named this project "Hefezopf", because that's a braided cake traditional to my Swabian home in Germany, so it's "culturally situated" for me. Everybody gets their piece of Euler-cake ;-)

Created March 28, 2021

Last updated March 29, 2021

Published March 28, 2021