Jasper van de Gronde wrote:
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?
No , unfortunately i can not use SVG directly because i should use fonts (texts) and there is no way to draw some texts without having a vectorial representation of text .(for example each character is composed of many points ( some lesser lines) the is no way to find those lines so i must convert SVG to bitmap and then send the bitmap to Marking machine).
I do not understand this problem relation with TSP , indeed some days (in college) i implement TSP solution based on Genetic algorithms. but in this time we have two factor that we need to optimize at once.
Any help is really welcom