// Line void setup() { size(640,480); background(255); //white } void draw(){ stroke(0); line(0,479, 639, 0); } //————————————– // Bounce Ball float x = 100; float y = 100; float xspeed = 1; float yspeed = 3.3; void setup(){ size(640, 480); smooth(); background(255); } void draw(){ background(255); x = x + xspeed; y = y + yspeed; if((x > width)||(x height)..
// 화면에서 노이즈 발생시 offset 값을 조정하여 질감의 조정 void setup() { size(640,408); background(255); //white } void draw(){ loadPixels(); float xoff=0.0; for(int x = 0; x < width; x++) { float yoff=0.0; for(int y= 0; y < height; y++) { float bright = map(noise(xoff,yoff), 0,1, 0,255); //float bright = random(255); pixels[x+y*width]=color(bright); yoff += 0.01; } xoff += 0.01; } updatePixels(); } //—————————————..
nature of code : shiffman 코드 사이트 : https://github.com/shiffman/The-Nature-of-Code-Examples 프로세싱 언어 입문서 : https://processing.org/learning/books 프로세싱 언어 다운로드 : https://processing.org/download 프로세싱 언어 Get Start : https://processing.org/tutorials/gettingstarted Getting start with processing sample : https://processing.org/books/media.zip !. Hello, World! println(“Hello,World”); !. Hello, World! void..