- 3

- 0

I have a shape (polygon) made up from pixels (squares) similar to the image below. I need an algorithm to cut it into "lines" i.e. shapes of 1x[1..20] pixels. The lines should not be necessarily straight, but they should fill the entire area.

Any ideas on where to start working on this? Is there a similar math algorithm out there or should I just try and "fit" the different shapes starting from the larger ones and then filling it up with 1x1's?

Thanks a lot for any input