WOLFRAM|DEMONSTRATIONS PROJECT

Traveling Salesman Art

​
move through tour
In a picture, random points are selected proportionally to the gray levels of the picture. An algorithm for the "traveling salesman problem"—which asks for the shortest path through a set of cities without passing through any of them twice—is then used to draw a precomputed continuous line with no overlaps through the set of points. This Demonstration lets you see how the tour progresses.