A hobbyist programmer asks...
Let's say a "pixelMap" is an array of x,y coordinates in a square region at which to render each color that's read from a separate array (in order from start to finish)
The purpose is to help "animate" the rendering of an image by defining an "interesting" path along which the image's pixels are rendered one pixel at a time over some duration.
E.g. the order of pixels rendered may follow a path that traces increasingly large circles emanating from the middle of the grid.
My difficulty is that the pixelMap's path must cover every pixel in the grid exactly once (the pixelMap and color Array are the same length, and every pixel must receive a colour.
So, I turned up the "Midpoint circle algorithm", but can't discern an application of it to help with my concentric circles pattern.
So...
Q1. Is there a relatively straightforward algorithm that will render the expanding concentric circles pattern, using every pixel once only?
Q2. Is anyone aware of any other algorithms or formula that produce pretty or amazing or interesting paths that could be fit for my purpose? I need a few different pixelMaps for variety. (And thanks, but I managed to work out concentric squares by myself ;-)
Thank you.