gray lines

Python program that draws an image using lots of lines.

Woman. 4096 lines, line width 0.1 pixels

Skull. 4096 lines, line width 0.1 pixels

Inspired by this video.

Algorithm

A few points are generated around the image, all possible combinations of point pairs are considered for the next line. Out of all of these, the line that produces the smalles pixel difference against the target image is selected. The process is continued for a fixed number of lines.

Author

vidstige