Legolas Woodland wrote:
Jasper van de Gronde wrote:
Legolas Woodland wrote:
Jasper van de Gronde wrote:
I understand, but Inkscape can convert text to a path. You'll probably still have to convert bezier curves to a sequence of lines, but it could be a start.
It is very good news that It can convert each character of a text into a path (am i right ?) , but the stopper for me is about converting a path into smaller lines . by the way is that a feature of your SVG editor or other editor has the same future ?
Pretty much every vector editor can do it as far as I know. In Inkscape you simply select the text object you want to convert to a path and select the convert to path action from the path menu.
I can think about this feature , if i could find a way to convert a path into some small parts of lines
You might be able to do this yourself if the document isn't too complex (and with a bit more effort if it is) by using one of various techniques for evaluating a bezier curve (it's not extremely difficult and there are quite a number of reasonably well-documented methods). One very well-known method is De Casteljau's algorithm: http://en.wikipedia.org/wiki/De_Casteljau%27s_algorithm The article has some pseudocode showing how to implement it.
In that case it seems to me you could simply see each (black) pixel as a node, connected to its neighbours and use some TSP solution. You may want to do some preprocessing, and there might be a simpler solution, but I think it should work.
It could take very long time as you know , using TSP for a bitmap with even a 20*20 pixel would take too long to calculate the best fitted path :(
I know, but there are quite a few heuristic methods you could use to get a decent approximation (like the genetic algorithms you mentioned).