I have been trying to figure out container packing in p5.js. After messing around for a while I ended up finding the package mapbox/potpack, which will take a list of containers and sort them so that they will fit into a more or less rectangular space.

I came up with these sketches that kinda looked like curtains to me.