Hatching image effect in R

Here’s a fun thing to try in R. Jean Fan posted some code snippets where you can load an image file and the result uses a hatching technique to recreate the image with shapes.

See also: Using the traveling salesman problem to re-sketch images.