デザイン言語 Processing 入門 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. http://www.morikita.co.jp/books/mid/084931 このサンプルページの内容は, 初版 1 刷発行当時のものです.
Processing Ben Fry Casey Reas Windows Mac Linux Lesson 1 Processing Lesson 2 Lesson 6 Lesson 2 Lesson 6 Lesson 6 Lesson 7 Lesson 7 Lesson 8 Lesson 9 Lesson 10 Lesson 11 12 i
Lesson 13 Lesson Lesson 14 3D Processing 3 2011 6 ii
Lesson 1 1 1 2 3 4 Lesson 2 6 6 9 10 12 setup draw 15 18 Lesson 3 19 19 20 21 Processing 23 for 23 for 24 25 1 28 Lesson 4 29 29 if 31 33 iii
Lesson 5 35 35 35 36 37 39 Lesson 6 40 40 2 43 Lesson 7 44 44 44 48 300 51 52 54 Lesson 8 65 65 66 67 68 69 Lesson 9 71 71 72 72 74 iv
Lesson 10 78 78 79 80 81 84 Lesson 11 88 88 89 90 91 92 93 Lesson 12 96 2 96 96 98 98 100 100 102 setup() draw() 103 Lesson 13 106 106 107 109 109 110 110 111 v
111 setup() draw() 112 Lesson 14 3D 118 118 3 118 119 120 123 124 1 126 2 127 129 1 129 2 129 131 vi
Lesson 1 http://processing.org/download Processing Mac Windows Windows zip Program Files Processing.exe Mac OS X disk image Application Processing Mac Windows Fig. 1.1 http://wiki.processing.org/index.php/troubleshooting Fig.1.4 8 Mac Windows Ver.1.5 Lesson 1 1
Fig. 1.1 Processing Fig. 1.2 Fig. 1.2 ellipse(50, 50, 80, 80); 2 Lesson 1
50 (pixels) 50 80 80 1 ; Fig. 1.3 Fig. 1.3 (File) Fig. 1.4 Save Save As Processing (sketch) (sketchbook) Fig. 1.4 Lesson 1 3
Open New Export (Applet) Web (Edit) Fig. 1.5 Cut Paste Comment/Uncomment (comment) (uncomment) Auto Format Fig. 1.5 (Sketch) Fig. 1.6 Run Stop Fig. 1.6 4 Lesson 1
(Tools) Fig. 1.7 Color Selector Fig. 1.7 (Help) Fig. 1.8 Reference Environment Vsit Processing.org Fig. 1.8 Lesson 1 5
Lesson 2 File New point() x y Processing Fig. 2.1 Fig. 2.2 120 120 size() point() x y (60, 60) File Save As fig2 2 Fig. 2.1 2 Fig. 2.2 size(120, 120); point(60, 60); (20, 100) (100, 20) Fig. 2.3 line() (x1, y1) (x2, 6 Lesson 2
y2) fig2 3 Fig. 2.3 size(120, 120); line(20, 100, 100, 20); Fig. 2.4 triangle() Fig. 2.4 size(120, 120); triangle(20, 20, 90, 50, 60, 100); Fig. 2.5 quad() Lesson 2 7
Lesson 4 mousex, mousey Processing setup() 480 120 fill(0, 100) 0 100 draw() 1 60 ellipse(mousex, mousey, 40, 40); mousex, mousey (x, y) Fig. 4.1 Fig. 4.1 void setup() { size(480, 120); smooth(); Lesson 4 29
fill(0, 100); nostroke(); } void draw() { ellipse(mousex, mousey, 40, 40); } Fig. 4.2 Fig. 4.1 draw() background(204); background(204); Fig. 4.2 void setup() { size(480, 120); smooth(); fill(0, 100); nostroke(); } void draw() { background(204); ellipse(mousex, mousey, 40, 40); } Fig. 4.3 pmousex, pmousey Processing mousex, mousey pmousex, pmousey dist() d 30 Lesson 4
d Fig. 4.3 void setup() { size(480, 120); smooth(); fill(0, 100); nostroke(); } void draw() { float d = dist(mousex, mousey, pmousex, pmousey); ellipse(mousex, mousey, d, d); } if if if if (test) { statements; } test (true) (false) statements Fig. 4.4 draw() background(128); fill(0); if mousepressed Processing mousepressed Lesson 4 31
Lesson 10 Fig. 10.1 Fig. 10.1 Fig. 10.2 4 4 4 30 30 4 Fig. 10.3 78 Lesson 10
Fig. 10.2 4 Fig. 10.3 16 Fig. 10.4 4 int square 2 Fig. 10.4 int[][] square = {{0, 11, 5, 14}, {7, 12, 2, 9}, {10, 1, 15, 4}, {13, 6, 8, 3}}; Lesson 10 79
Excel Excel Processing C 2011 2011 6 20 1 1 1 4 11 102 0071 03 3265 8341 FAX 03 3264 8709 http://www.morikita.co.jp/ / / / PrintedinJapan ISBN978 4 627 84931 0