A
A
andre_max2016-02-24 21:31:06
Programming
andre_max, 2016-02-24 21:31:06

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

1 answer(s)
A
Albert, 2016-03-01
@Northsoft

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 question

Ask a Question

731 491 924 answers to any question