Strategy for depth-first seeding

(Some loose and unconnected thoughts) Simple idea, we want to seed the center of the bounding box first and descend to the bottom before moving outwards on any level. Sort of like a tornado increasing in size.

The (possibly) tricky part is to do this for N threads. Approaches

  • Each thread start on a different level, has a stopping criteria
  • Well defined motion and offset for each thread
  • Well defined, but less complicated (not spiral) motion. Do sides?
  • Have a pool of available rings and let the threads grab from it ?

Algorithm idea for 2nd point: -Calculate bounds -Tile 0 is the center -Tile 1 is the center + 1 (meta)tile in the Y direction -Increase x until tile exceeds x direction

The hard stuff is the corners, so you need to know the width of each ring (previous with + 2), and use the overshoot to go negative y.

The above doesnt really do depth-first, you'd also want to do the center tiles for each level first, then do one more tile (or ring) each level, etc.