This is an implementation of the 3-shears rotation algorithm. The idea is succinctly explained here, and I based my implementation on this Medium post.
Differences with the fastRot implementation:
Lossless rotation - all pixels are preserved (i.e. no pixel is added or removed)
The rotation is stable around the center - there's no "wobbliness" when rotating, it's especially noticeable with the red car in the example
~2.5x slower than fastRot
I added the algorithm in the benchmarks list, and you can swap between the 2 functions in examples/rotation.nim
This is an implementation of the 3-shears rotation algorithm. The idea is succinctly explained here, and I based my implementation on this Medium post.
Differences with the fastRot implementation:
I added the algorithm in the benchmarks list, and you can swap between the 2 functions in examples/rotation.nim