Difference between revisions of "TSP art"
Line 1: | Line 1: | ||
− | Likenesses of images can be made by processes of halftoning | + | [[http://mtbaldy.us/~dnewman/tspart/mona-lisa-tsp.png]] |
+ | |||
+ | Likenesses of images can be made by processes of dithering, halftoning, or stippling as well as other techniques as shown in the four images below. (Left to right: original color image, grayscale dithered image, halftone screened image, and stippled image) | ||
[[http://mtbaldy.us/~dnewman/tspart/mona-quartet.jpg]] | [[http://mtbaldy.us/~dnewman/tspart/mona-quartet.jpg]] | ||
− | However, to produce an image on the Eggbot, we want a process that not only generates a pleasing likeness of the image, but is also recognizes the Eggbot's mechanical nature. Pen plotters such as the Eggbot excel at drawing long, continuous paths but are mediocre at drawing thousands of small, shaded fills (halftones | + | However, to produce an image on the Eggbot, we want a process that not only generates a pleasing likeness of the image, but is also recognizes the Eggbot's mechanical nature. Pen plotters such as the Eggbot excel at drawing long, continuous paths but are mediocre at drawing thousands of small, shaded fills (dithers, halftones screens). Pen plotters are somewhat better suited to drawing thousands of small circles and points (stipples). With stippling, an image's grayscale tonal quality is reproduced by drawing more stipples in darker regions of the image and fewer in lighter regions. That is, the density of stipples in a given region of the canvas increases with increasing darkness in the same region of the original image. Unfortunately, even stippling can be challenging to the pen tip of a pen plotter -- the tip can mushroom out after many pen down operations. And, the many pen up and down operations are slow relative to drawing connected segments of lines. |
Sounds like we want a means of reproducing an image by drawing continuous paths, and preferrably as few distinct paths as possible.... | Sounds like we want a means of reproducing an image by drawing continuous paths, and preferrably as few distinct paths as possible.... | ||
− | Welcome to "TSP art" in which an image's tonal quality is reproduced with a | + | Welcome to "TSP art" in which an image's tonal quality is reproduced with a '''single''', continuous path. This single path meanders over the entire canvas. Like stippling, segments of this path appear more frequently in regions of the canvas which correspond to darker regions in the original image. And, fewer segments of the path in lighter regions. But how and where do we choose to draw this path? By treating this question as a Travelling Salesman Problem (TSP), the path may be determined. To do so, we first produce a stippled representation of the image. We then ask, "What is the shortest possible path that visits each and every stipple exactly once and then returning to the starting point?" That is precisely the Travelling Salesman problem with cities in the salesperson's journey replaced by stipples on our canvas. Determining the correct answer to the TSP is actually very hard (NP-hard). But, even fast approximate answers work well with the Eggbot. See the image at the top of this page for an example. |
− | entire canvas. Like stippling, segments of this path appear more frequently in regions of the canvas which correspond to darker regions | ||
− | in the original image. And, fewer segments of the path in lighter regions. | ||
− | path | ||
− | image, |
Revision as of 16:00, 26 September 2010
[[1]]
Likenesses of images can be made by processes of dithering, halftoning, or stippling as well as other techniques as shown in the four images below. (Left to right: original color image, grayscale dithered image, halftone screened image, and stippled image)
[[2]]
However, to produce an image on the Eggbot, we want a process that not only generates a pleasing likeness of the image, but is also recognizes the Eggbot's mechanical nature. Pen plotters such as the Eggbot excel at drawing long, continuous paths but are mediocre at drawing thousands of small, shaded fills (dithers, halftones screens). Pen plotters are somewhat better suited to drawing thousands of small circles and points (stipples). With stippling, an image's grayscale tonal quality is reproduced by drawing more stipples in darker regions of the image and fewer in lighter regions. That is, the density of stipples in a given region of the canvas increases with increasing darkness in the same region of the original image. Unfortunately, even stippling can be challenging to the pen tip of a pen plotter -- the tip can mushroom out after many pen down operations. And, the many pen up and down operations are slow relative to drawing connected segments of lines.
Sounds like we want a means of reproducing an image by drawing continuous paths, and preferrably as few distinct paths as possible....
Welcome to "TSP art" in which an image's tonal quality is reproduced with a single, continuous path. This single path meanders over the entire canvas. Like stippling, segments of this path appear more frequently in regions of the canvas which correspond to darker regions in the original image. And, fewer segments of the path in lighter regions. But how and where do we choose to draw this path? By treating this question as a Travelling Salesman Problem (TSP), the path may be determined. To do so, we first produce a stippled representation of the image. We then ask, "What is the shortest possible path that visits each and every stipple exactly once and then returning to the starting point?" That is precisely the Travelling Salesman problem with cities in the salesperson's journey replaced by stipples on our canvas. Determining the correct answer to the TSP is actually very hard (NP-hard). But, even fast approximate answers work well with the Eggbot. See the image at the top of this page for an example.