The iconic 10 Print algorithm is probably not only the simplest, but the most influential, algorithm form random pattern generation.
This small project is an attempt to not only replicate 10 Print patterns on HTML canvas, but also to add some animation and other sugar to it.
Pretty simple: iterate over the canvas in rows and cols and randomly draw a line from top-left to bottom-right or top-right to bottom-left of that cell.
You can find a basic implentation in the 10Print.js
file.