size(200,200); background(255); int sw=1; //stroke weight for(int y=0; y<=200; y=y+10){ //y is the y axes increased by 10 using for loop smooth(); line(0,y,200,y); if(y>=40){ sw=sw+1; strokeWeight(sw); } }