Finch Fractals

 


I have loved fractals for a long time - in high school, I did an extended project that involved writing C programs to draw Julia and Mandelbrot sets. When the Finch 2 had encoders and more precise movement, I was eager to push them to the limits and see what I could do. This project was completed in the spring of 2020, but it took me awhile to get around to writing it up.

All of my fractals were drawn with Snap!, a block-based language that supports advanced concepts such as the recursion needed to draw fractals. My code is here. It uses custom blocks to draw the fractals on the screen; the blocks to draw the same fractals with the Finch have corresponding names and are located at the bottom of the Motion menu. A lot of my code was based on this great site by Robert Dickau, which gives the generation rules for a number of popular (and beautiful) fractals. For more information on how to use recursion in Snap! to draw fractals with the Finch, see here.

Note: The Finch does a good job drawing fractals, but it does take while. All videos here were sped up to 20x the original speed.

I started with a very simple version of the Koch snowflake that later evolved into the more complex version seen above. 
Not every fractal worked well with the Finch. It is a physical robot, and while its moves are accurate, it does accumulate error over time. This is more noticeable in fractals that double back on themselves, such as the Dragon curve. You can see some overlap at the corners of the squares.
And now, a gallery of Finch fractals!
Hilbert Curve
Quadratic Koch Island
Peano-Gosper Curve
Square Curve

Comments