In Greek mythology, the Labyrinth was a cunning maze built by Daedalus and Icarus to contain the savage half-bull Minotaur. So complex was the Labyrinth, its own builders could only escape on wings of Daedalus’ making…which didn’t end well for Icarus. The Minotaur, surviving on human sacrifices, roamed the Labyrinth for years until slain by Theseus.
Image: Edward Burne-Jones — Tile Design - Theseus and the Minotaur in the Labyrinth — 1861, public domain.
This project has you losing yourself in the Labyrinth, smoothly animated in 3D (30+ frames per second) on the Hallowing display, using tricks that might have impressed Daedalus had he stuck around for microcontrollers and bitmapped graphics.
It’s really just a fancy graphics demo, something to fidget with and amaze your friends*. Despite the name, there’s no actual Minotaur after you. No flag to capture. No exit to flee. The code and techniques used here may prove insightful to programmers learning to maximize graphics performance on microcontrollers.
* If they’re not amazed, they’re not really your friends.
The Minotaur Maze code uses ray casting — a computer graphics technique that’s sort of a dollar-store version of ray tracing. Most famously seen in id Software’s Wolfenstein 3D, ray casting is really a two-dimensional algorithm…the most difficult math is required only across a single scan line, the result then extended vertically to create the illusion of a three-dimensional environment.
The ray casting part of the code is adapted from a tutorial by Lode Vandevenne.
Everything needed for this project is built into the HalloWing board, no extra components are required. (A battery can optionally be added to make it self-contained and portable.)