size (200,200); background(255); int y0=0;//line1 int y1=0;//line2 int s=255;//stroke color while (y0<200) { stroke(s,0,0); s=s-5; smooth(); line(0,0,200,y0); line(200,0,0,y1); y0=y0+4; y1=y1+4; }