Edit in JSFiddle

</script>
<script type="application/processing" data-processing-target="myCanvas">
size(320, 320);
rectMode(CENTER);
colorMode(HSB,360,100,100,100);
background(180, 35, 80, 20);

int w = width;
int h = height;
int rectW = 10;
int num = 20;
noStroke();

translate(w/2,h/2);


for(int i=0; i<num; i++){
	float randColor = random(150, 250);
	fill(randColor, 55, 70, 30);
	
	pushMatrix(); // ここの座標をセーブ
	
	// 座標を変換してから描画
	rotate(radians(i*30));
	translate(10*i, 0);
	rect(0, 0, rectW, rectW);
	
	popMatrix(); // 前の座標をロード
}