Skip to content

Comment on Show HN: Rotation via Double Reflectionparent

Comments

Alan Paeth's three-shear rotation is one of my favorite algorithms, especially because it's perfectly suited for rotating pixel art. Because shearing preserves all the original pixels, it even works with dithered images, unlike sampling-based rotation schemes.

It's also fairly simple to implement. I have implemented a version that rotates ASCII art, and that code made it to Ruby's list of sample programs:

https://github.com/ruby/ruby/tree/master/sample/trick2025/01...

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.