module strand(j,len){ // strand counter, length le=len/10; ysep=sep*j; ty=ysep+10+yty[j]; by=ysep+yby[j]; b=[0,ty]; c=[for (j=[1:1:(le/2)-1]) [j*di,ysep+10+rands(-2,2,1)[0] ]]; d= [(le/2)*di,ty]; e=[(le/2)*di,by]; f=[for (j=[(le/2)+2:1:le])[(le-j+1)*di,ysep++rands(-2,2,1)[0]]]; g=[0,by] ; p=concat([b],c,[d],[e],f,[g]); polygon(p); } module block(ns,len){ // number of strands, length for (j=[0:1:ns-1]) strand(j,len); } di = 20; // y distance between points (needs fixing at 20) //ns = 15; // number of strands maxs = 50; //maximum number of strands (for start and ends) sep = 18; // strand separation //len = 40; // length of strand yby= rands(-2,2,maxs); //generate start and end r points yty= rands(-2,2,maxs); // play with blocks for (j=[2:1:10]) translate([j*100,0,0])block(22,100); block(20,100); translate([200,395,0])block(15,900);