岡山県立大学オープンキャンパス資料

36
ププププププププ プププププププププププ プププププププププププ プププププププププププ ププププ[email protected] http:// www.slideshare.net / kunishi /2012072

Upload: takeo-kunishima

Post on 15-May-2015

1.813 views

Category:

Technology


5 download

DESCRIPTION

岡山県立大学オープンキャンパスで実施している体験講義用資料。Processingを題材として、プログラミングの体験をしてもらうという内容です。2014-07-25追記: 改訂版に置き換えました。

TRANSCRIPT

2. Processing etc. 3. Processing http://www.processing.org/ Processing http://ap.kakoku.net/ Processing Built with Processing / BNN 4. 5. 6. 1. ellipse(50, 50, 80, 80); 2. 1 (1)Ellipse(50, 50, 80, 80); (2)ellipse(50. 50, 80, 80); (3)ellipse(50, 50, 80, 80) [] ! 7. 3. URL & https://gist.github.com/3096487 8. (), {} void setup() { size(480, 120); smooth(); } void draw() { if (mousePressed) { fill(0); } else { fill(255); } ellipse(mouseX, mouseY, 80, 80); } 9. 4. size(800, 600); point(240, 60); line(20, 50, 420, 110); [] Processing (1, 2, ) Processingx yy [] size(, ) 10. (1) point(x, y) (x, y) line(x1, y1, x2, y2) (x1, y1) (x2, y2) rect(x1, y1, width, height) (x1, y1), width, height triangle(x1, y1, x2, y2, x3, y3) (x1, y1), (x2, y2), (x3, y3) quad(x1, y1, x2, y2, x3, y3, x4, y4) (x1, y1), (x2, y2), (x3, y3), (x4, y4) 11. (2) ellipse(x1, y1, width, height) (x1, y1), width, height width height arc(x1, y1, width, height, start, end) (x1, y1), width, height, start, end radians(a)a0a360 : arc(90, 60, 80, 80, 0, radians(90)) 12. 5. 480, 120 2 (160, 30), 260, 20 (140, 0), 190 https://gist.github.com/kunishi/7996f7d50e511e3358d9 13. 0 RGB(R), (B), (G) HSBHSB 14. (1) colorMode(mode, max) mode (RGB HSB)max background(), background(R, G, B), background(H, S, B) [] colorMode(HSB, 100); // HSBH, S, B099 background(99); // 99 15. (2) stroke(), stroke(R, G, B), stroke(H, S, B) strokeWeight() noStroke() fill(), fill(R, G, B), fill(H, S, B) noFill() 16. 6. https://gist.github.com/3134851 ? 17. fill(45, 80, 99); rect(0, 0, 200, 200); fill(45, 60, 99); rect(0, 0, 150, 150); fill(45, 40, 99); rect(0, 0, 100, 100); fill(45, 20, 99); rect(0, 0, 50, 50); [0] 80 = 80200, 200 = 200500 [1] 60 = 80201, 150 = 200501 [2] 40 = 80202, 100 = 200502 [3] 20 = 80203, 50 = 200503 18. 7. 6https://gist.github.com/3134851 ? https://gist.github.com/kunishi/53f33842f7e95207e37c 19. int i; // for (i = 0; i