I tried something like this years ago but using genetic algorithms https://a.tulv.in/genetic-art.html