I have a 100x360 rectangle. I want to cross it with a 9,000 unit long line of boxes. ~9000 is too many to fit in a straightaway of 360, but since the area is 36,000 then ~9,000 would fit comfortably.
However, I want the occupied spaces to be as equidistant as possible from their front and back neighbors, with as much distance as possible between the nodes while still following a clear sing-file line pattern
As you can see from the image, Red 1 is as many steps away from Red 11 as Blue 7, and Red4 is as many steps to Red6 as it is to Red8. The obvious solution is to try to get the slope to be as steep as possible on the edges, while being constrained by the need to use the width of the area to fit the length of my 9,000 unit long line in a 360 length rectangle.
Say I use the entire width of 100 to start and do it like tetris, then I only advance 90 paces forward before reaching the end of the line, well short of the 360 length available to me, so I can spare some length to help deepen the curve and not have it looped too tight but I'm having trouble finding the right numbers for my equation that tells me how much to accelerate the increase in length at the edges to produce a smoother curve while fitting as closely as possible the total rectangle length.
Now obviously I understand that using a square format is fairly inaccurate since the diagonal distance of each box is actually the square root of 2 and not 1. Calculations may take this into account, but in the end I will have to round everything to the nearest whole box when I fill everything in.
The most direct way would be to divide ~9,000 by 360 and get ~25 steps of width (~1/4 the total width) for every step forward. However, this produces a strong "looping back" effect like in the image above where the line is squeezed together at the edges of the rectangle, so I need to use some of the forward length to produce a longer curve at the edges, but also not so much as to start pinching the lines together at the middle or wasting too much space.