Research Topics/Processing Studynote

11월 10일 유승환 공혜선 전주영 조

알 수 없는 사용자 2007. 11. 17. 11:28
void setup(){
size(1200,200);
smooth();
background(0);
strokeWeight(2);
colorMode(HSB,100);
}
void draw(){
for(int i = 0; i < width; i++) {
  float h = random(2);
  float s = random(100);
  float b = random(100);
  float a = random(100);
  float x = random(0, width);
  stroke(h,s,b,a);
  line(i, 0, x, height);
}
}


random과 for문에 대해서 배워보는 시간이었습니다.