I made a web page that generates a new pattern of lines when it refreshes. The algorithm is not simply random. I added some restrictions, for instance, all colors should be in a small range in each of HSV(Hue, Saturation, Value). Colors produced in this way is more harmonious.
Click here to view the webpage or scroll to see a sample below.
Extract from pictures
I also made a Swift playground that can create lines in photos. You can easily drag on photos to get lines between parts that have been apart. There are three modes of creating lines - horizontal, vertical, and square. Combining these modes, you can make your picture of lines in millions of ways.
It provides four demo photos, which are all taken by me in four cities including Shanghai, Yunnan, Wuhan, and New York. Of course, you can extend it by adding your photo in the resources folder and adding routes in the images array in the playground. While you are drawing, you can click on the restart button to restart and the random button to have a new photo to draw on. It’s also easy to save your work as an image by clicking the save button.