size(400, 400); background(255); float rightLength = 230;//線分の横幅 float space = 3;//線分同士の幅 for (int i = 0; i<= width; i+=space) { float reverse = i; if (i > width/2) reverse=width - i; line(i, width/2-reverse, i+rightLength, width/2-reverse);//上半分の折り返したような図形を描画 line(i, reverse+height/2, i+rightLength, reverse+height/2);//下半分の折り返したような図形を描画 }