module strand(ysep,see){ // rand at 20 // ty=ysep+10+rands(-2,2,1)[0]; // by=ysep+rands(-2,2,1)[0]; // the above two rands, generate the y end points, // but they should not change for each iteration of block // but should change for every iteration of strand within a block ty=10+ysep; by=0+ysep; b=[0,ty]; c=[for (j=[1:1:(len/2)-1]) [j*20,ysep+10+rands(-2,2,1)[0] ]]; d= [(len/2)*20,ty]; e=[(len/2)*20,by]; f=[for (j=[(len/2)+2:1:len])[(len-j+1)*20,ysep++rands(-2,2,1)[0]]]; g=[0,by] ; p=concat([b],c,[d],[e],f,[g]); polygon(p); } module block(){ for (j=[0:1:ns-1]) strand(sep*j,j*7); } ns = 50; // number of strands sep = 20; // strand separation len = 10; // length of strand for (j=[2:1:10]) translate([j*100,0,0])block(); block();