In the 80's I was involved with some rather cool projects for a firm that, unbeknownst to me at the time, was spiraling into the ground: Penguin Software/Polarware. No, it had nothing to do with Linux.. the name was inspired by the exploding penguins atop the TV in a famous Python sketch.
I was whailing away at my C64 at home and discovered a graphics package offered by Compute! magazine installment-style. It had source code, much of which was detailed in the article series, as well as those goofy 'type it in yourself' assistance programs where you literally typed in an endless series of numbers into a basic program that then would checksum it line by line, and inform you if you'd entered one wrong.
Well, this particular package would let you, via peeks and pokes, create graphics on your screen. Set pixels to various colors. The thing that turned ME on about it was the line-draw routine. Drawing lines cleanly on an x/y matrix sort of screen isn't obvious. There are all those pesky *angles*! And geometric *cases*. And stuff!
Well, what the author did was to incorporate a brilliant shortcut to Bresenham's algorithm, first published in Byte and created by a guy named Higgins(Mike?). It lopped off all sorts of execution time, yet still gave the exact same precision and line fit that the original did.
Once I grokked how that sucker worked, I was hooked. I also realised that it could be sped up even further, by inverting the logic and exploiting 6502 flag wackiness so as to eliminate any compares in the main loops. Which I did. And it worked.
It was very similar to vanilla Bresenham but way streamlined down so as to work really well on a 6502. I've implemented on x86 as well.., and you get the same advantages.. all integer arithmetic, and you can keep all the operands in registers.
My first real hack. Damned if it didn't feel good!
It gets cooler, though. I later used that same code base to do CIRCLES! Rubber banding circles, even! So fast that you couldn't even see them get drawn! Scaled to the aspect ratio of the screen! ON A 1MHZ 6502! WOOHOO!
I actually spell well without artificial aids. That must count for something.