繰り返し(ループ)とランダム


テキストP69までの成果。ランダムを使ってるので、リロードすると絵が変わるよ。

http://www.tigeronbeat.com/applet070516/index.html

size (640,480);

colorMode(RGB,256);
background(0,0,0);
noStroke();
smooth();

for(int y=0; y<height; y++){
float back= random(0,64);
stroke(back,0,0);

line(0,y,width,y);
}

for(int i=0; i<16; i++) {
float colorR = random(200,256);
float colorG = random(200,256);
fill(colorR,colorG,0,200);

float x= random(0,width/2);
float y= random(0,height);
float szx= random(64,192);

arc(x,y,szx,szx,radians(30),radians(330));
}

Posted: 水 - 5月 16, 2007 at 12:26 午前          


©