</script> <script type="application/processing" data-processing-target="myCanvas"> size(320, 320); rectMode(CENTER); // rect(中心のx座標, 中心のy座標, 幅, 高さ) colorMode(HSB,360,100,100,100); background(180, 35, 80, 20); int w = width; int h = height; int rectW = 10; int num = 20; int gutter = (w - rectW * num) / (num - 1) + rectW; // 間隔 noStroke(); translate(w/2,h/2); for (int i=0; i<num; i++) { float randColor = random(150, 250); fill(randColor, 55, 70, 40); rect(0, 0, rectW, rectW); // 座標移動 translate(gutter, 0); // 回転 // rotate(radians(角度)); rotate(radians(360/num)); }