Answer the question
In order to leave comments, you need to log in
How to paint an arbitrary shape with lines?
How to paint over the shape of an arbitrary area with a continuous line? The optimal algorithm is the one in which the line length is minimal.
As input, the program receives an array of border coordinates (x, y) of an arbitrary area and the line width. Let's allow the minimum exit for borders of area.
A more complicated version: the line, approaching the border of the area, should unfold along the arc of a circle.
Answer the question
In order to leave comments, you need to log in
The algorithm is serious, I'm afraid no one will implement it for you for free. I would do like:
And yet, the algorithm for the shortest path through all points is a traveling salesman problem , known for its complexity. I'm afraid that it will be quite difficult to optimize something here, this is more a task for research institutes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question