Legolas Woodland wrote:
Hi Thank you for reading my post , and I'm sorry if this place is not suitable place for this question I have a long list of all pixels in a bitmap for example , i have all X,Y of all pixels and now i want to draw the bitmap using those X,Y s Problem is that i send all this points to a Robotic like machine , and machine will use this points to draw the bitmap (by using sequential hits) on a metal surface. as you know in such machine we should minimize head (mechanical tool that hit the surface to make the bitmap) movement to achieve better overall performance . Now i should find an algorithm or method to sort those X,Y points in a way that head movement become minimum. is there such algorithm around ? ...
Sounds like the travelling salesman problem (a quick search will find more than enough information, unfortunately an exact solution is quite costly). But is it necessary to go through a bitmap? Can't you use the SVG data more directly?