Try-Haxe with Canvas // Langton's Ant

I made this quick Haxe example of Langton’s Ant for a presentation the other week. It’s fun drawing on a <canvas> from try haxe.

Basically it’s a path drawing algorithm that has only two very simple rules, but it creates some crazy, seemingly intelligent patterns. The start position is randomized, and that matters a lot, so hit Build+Run a few times.

image

7 Likes

Looks fun! Never been using try-haxe with canvas, only for code and console output.