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