Recursively rotating segments of an image rotates the image itself
Code by rvizzz on GitHub: https://github.com/rvizzz/rotate pic.twitter.com/IyLwKyCqKw
-
-
Prove for 2x2 matrix and scale up! :)
-
Seems like thinking of it recursively works too — each translation moves the pixels to the correct quadrant. Recurse until you hit pixel scale
Keskustelun loppu
Uusi keskustelu -
-
-
Feels in the spirit of the Fast Fourier Transform
-
If you think in terms of a hierarchical coordinate system based on four quadrants, what this does is that it modifies each coordinate in turn: at the largest scale, then the second largest, etc. So by the time you get to pixels you've updated all the coordinates for each pixel.
- Näytä vastaukset
Uusi keskustelu -
-
-
Radix sort!
-
For each pixel, where does it need to go in the rotated image? The first step moves everything into the correct 1/4 of the image, then the correct 1/16, and so on.
- Näytä vastaukset
Uusi keskustelu -
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.