Rotation with three shears
Hah! Author of that 20-year-old web page here.<p>At the time I was attempting to use standard open source image processing software like ImageMagick to manipulate scientific data. I was disappointed to find that it was not suitable, both due to approximations like this one, and because all the libraries I looked at only allowed 8-bit grayscale. I really wanted floating point data.<p>Here is what I was working on back in those days: <a href="https://www.ocf.berkeley.edu/~fricke/projects/israel/projects.html" rel="nofollow">https://www.ocf.berkeley.edu/~fricke/projects/israel/project...</a><p>I was a summer student at the Weizmann Institute of Science in Rehovot, Israel, processing electron micrographs of a particular protein structure made by a particular bacterium. It's very interesting: this bacterium attacks plants and injects some genetic material into the plant, causing the plant to start manufacturing food for the bacterium. By replacing the "payload" of this protein structure, the mechanism can be used to insert other genetic structures into the plant, instead of the sequence that causes it to produce food for the bacterium. Or something like that.<p>Here's a random chunk of my research journal from those days: <a href="https://www.ocf.berkeley.edu/~fricke/projects/israel/journal.html" rel="nofollow">https://www.ocf.berkeley.edu/~fricke/projects/israel/journal...</a><p>The work contributed to this paper: <a href="https://www.jbc.org/article/S0021-9258(20)66439-0/fulltext" rel="nofollow">https://www.jbc.org/article/S0021-9258(20)66439-0/fulltext</a><p>Here's the Wikipedia article about the author of that algorithm: <a href="https://en.wikipedia.org/wiki/Alan_W._Paeth" rel="nofollow">https://en.wikipedia.org/wiki/Alan_W._Paeth</a><p>And his original web page that I linked to, now via archive.org: <a href="https://web.archive.org/web/20050228223159/http://people.ouc.bc.ca/awpaeth/awpaeth.html" rel="nofollow">https://web.archive.org/web/20050228223159/http://people.ouc...</a><p>If you liked this trick, check out Alan Paeth's "Graphics Gems" series of books.<p>Kudos and thanks to the OCF at UC Berkeley which has hosted my web page there for more than a quarter century with just about zero maintenance on my part.<p>And thanks for the trip down memory lane!