3

I have a rectangular area of known dimensions, $x$ and $y$. I want to draw a continuous (i.e. non-crossing) line inside this rectangle that is as long as possible. The radius of curvature at any point on the line can not be less than a value, $r$, and the line cannot come closer that distance, $p$, to any other point on that line. How do I determine the layout of this line, and its maximum length?

This is inspired by the Hamiltonian path approach as a solution to the video game snake, as exhibited here. The Hamiltonian approach clearly has a defined analytical solution, but I suspect that with my additional constraints this mutates into a numerically-driven optimisation problem.

I do not, as yet, have any other constraints, such as starting and finishing within the same region - I just want to maximise the line length per unit rectangle area. Can anyone direct me to a starting point?

My initial takes were to develop solutions along the theme of spirals - either entirely concentric or racetrack-like but this leaves a lot of real estate (particularly the centre) untouched. I'd like to think there is a Hamiltonian-esque solution to fill-in the gaps.

KReiser
  • 65,137
Alex
  • 31
  • You write "continuous (i.e. non-crossing)". That seems to imply that you're not using "continuous" in the usual mathematical sense of the term. Should we infer that the line doesn't necessarily have to be continuous in the usual sense of the term?

    How do you define the line coming closer than distance $p$ to any other point on the line? Obviously points on the line are arbitrarily close to each other -- you probably mean something like points that are distance less than $p$ apart despite being at least distance $p$ apart from intervening points on the line?

    – joriki Nov 29 '19 at 13:20
  • 1
    If you want your curve to have curvature radius at least $r$ you will be stuck in a circle of radius $r$. Is that really what you want? – frog Nov 29 '19 at 19:29
  • @joriki Yes, you've got what I mean. This problem has a practical application where the line has a finite thickness and is not allowed to touch other parts of the line. – Alex Dec 03 '19 at 12:47
  • @frog If I only have a circle of radius $r$ then that does not sound like I have filled much of my rectangular space. I am hoping that curves of greater $r$ can be leveraged to fit more of the line into my rectangle. My early simple spiral examples start at $r$ and get larger by $p$ in each revolution - I am starting to think this is the optimum solution. – Alex Dec 03 '19 at 12:51
  • I'm sorry for the late reply and I think I got the thing wrong: If your radius of curvature needs to be bounded ($r<M$ for some $M<\infty$), you can't have any inflection points. On the other hand, if you want $M<r$ for some $0<M<\infty$ you can't bend the curve as much as you seem to want... Maybe you should clarify your assumptions. And do I get this right? Your condition on $p$ means that you have a tubular neighborhood of width $p$ around your curve that is still embedded? – frog Dec 19 '19 at 07:04

0 Answers0