The first version of this app was in 3D, written 2 years ago in managed directx. Those APIs change so much that my app won't even compile anymore with the current DX SDK.
I wanted to stay away from DirectX, so I rebuilt this app using GDI. You will notice that the graphics are not exactly very good looking, because the app uses integer coordinates for all the drawings.
The algorithm.h is optimized for space, since the code in that file runs in an 8-bit microcontroller. The algorithm uses less than 1K of RAM. I could could have written it to use 5 times less memory, But I made some tradeoff between algorithm quality and space.
I am rebuilding the app to learn WPF (back to 3D again)
Here is what it looks like so far.