Monday, March 28, 2011

Happy Bugs

Programming mistakes might usually lead to a crash, lost work, tears, etc., but here are a couple pleasant surprises courtesy of MagicTile coding goofs.

The following was caused by a coloring bug. I accidentally left out a line of code, which caused the yellow and black outline colors to take over in a completely unexpected way.

This past weekend, I was testing slicing off the tips of polygons in a hyperbolic tiling, and saw this beautiful, fortuitous image appear on my screen.

The cause... I had failed to tell the slicing code to recalculate the centers of the sliced up pieces, so they were way off from where they should have been. The intended (much less satisfying) outcome was this.

I liked the unanticipated effect, so captured a couple more pictures before fixing the bug :)