There is code to drawing image as a continuous-line


enter image description here

data = ColorQuantize[ColorConvert[tako, "Grayscale"], 2]
pos = PixelValuePositions[ImageAdjust[data], 0];
res = FindShortestTour[pos];

enter image description here

but there is intersection points if I zoom it.

enter image description here

How can I draw it without intersections?

  • 2
    $\begingroup$ I can tell you why it happens, but I'm not sure you can easily solve it. From the docs for FindShortestTour, "For large datasets, FindShortestTour finds a tour whose length is at least close to the minimum." And "Use PerformanceGoal->"Quality" to find an optimal result." However, you've got way too many points to solve a TSP optimally on your data. Looking at the intersections you've got you might be able to unda a large number of them manually, though. $\endgroup$ – Martin Ender Dec 13 '16 at 14:12
  • 1
    $\begingroup$ see this: demonstrations.wolfram.com/… $\endgroup$ – mrz Dec 20 '16 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.