3 ms·
I’m not making claims about production graphics algorithms, but this gets really interesting if you consider using quad trees to represent images rather than bi
by a4isms 5y ago
I’m not making claims about production graphics algorithms, but this gets really interesting if you consider using quad trees to represent images rather than bitmaps.
The algorithm as presented turns the image into a quadtree as it works, for then re-flattens it. But if we store the image as a quadtree to begin with, we obtain other advantages:
1. We can memoize operations like rotation so that the algorithm goes much faster for images that have large blocks of a single colour or pattern;
2. We can write other operations that recursively apply to the image, like changing one color to another.
http://raganwald.com/2016/12/27/recursive-data-structures.html http://raganwald.com/2016/12/27/recursive-data-structures.ht...
Original discussion:
https://news.ycombinator.com/item?id=13304487 https://news.ycombinator.com/item?id=13304487