- 2007年10月16日 19:29
- proce55ing
proce55ing / plactice01
バリバリの初心者ですが今更proce55ingの練習など…。
Source code: plactice01
.........................................................................
float xx , yy; //位置
float Cx , Cy; //中心
float Angle; //角度
float R; //半径
void setup(){
size(500,500);
background(0);
colorMode(RGB,256);
noStroke();
frameRate(30);
Cx = width / 2;
Cy = height / 2;
Angle = 60;
R = 360;
}
void draw(){
fadeToWhite();
Angle += 3;
xx = Cx + (R * sin(radians(Angle)) );
yy = Cy + (R * cos(radians(Angle)) );
int x = int(random(width));
int y = int(random(height));
int sz = int(random(40));
int angle = 1;
int x_margin = 1;
translate(-150,460);
for(int i=680 ; i > 0 ; i--){
fill(randomRGBColor());
smooth();
pushMatrix();
translate(i*x_margin,150-i);
rotate(radians(i*angle));
rect(xx,yy,sz/10,sz/10);
popMatrix();
}
}
color randomRGBColor(){
color c = color(random(256),random(256),random(256));
return c;
}
void fadeToWhite(){
rectMode(CORNER);
fill(0,2);
rect(0,0,width,height);
}
- Newer: Apple Leopard
- Older: bayfm78 Radio Surprise!! 待ち受け