-
Notifications
You must be signed in to change notification settings - Fork 4
/
09-drawing.pd
140 lines (140 loc) · 3.73 KB
/
09-drawing.pd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#N canvas 531 42 587 659 10;
#X declare -lib Gem;
#X obj 16 12 cnv 15 400 50 empty empty 9 14 24 0 24 -175655 -66577
0;
#X msg 19 134 create \, 1;
#X msg 27 160 0 \, destroy;
#X obj 117 134 gemhead;
#X obj 117 166 pix_video;
#X obj 117 378 pix_texture;
#X obj 117 402 rectangle 4 3;
#X text 344 126 This is a render-chain.;
#X text 346 140 Always start it with gemhead.;
#X text 344 168 takes the video image from your camera;
#X text 5 399 onto an rectangle;
#X obj 117 191 pix_rgba;
#X text 346 188 converts the colorspace;
#X text 16 540 Challenge:;
#X obj 117 303 pix_blob 4;
#X obj 116 462 gemhead;
#X obj 19 190 gemwin 12;
#X text 348 298 detects the center of gravity;
#X obj 242 357 > 0.001;
#X obj 189 235 hsl 100 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 1980 1;
#X text 2 377 textures the image;
#X text 294 351 if the blobsize is to small;
#X text 325 413 computer and camera;
#X text 297 400 you may have to ajust this for your;
#X text 292 233 threshold;
#X text 350 311 of blobs in the alpha channel;
#X obj 117 280 alpha;
#X obj 157 280 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#N canvas 522 443 697 327 draw 0;
#X obj 122 -96 inlet list;
#X obj 134 58 route 1 2 3 4 5 6 7 8 9 10;
#X obj 287 79 route 11 12 13 14 15 16 17 18 19 20;
#X obj 134 -22 f;
#X obj 162 -22 + 1;
#X floatatom 267 15 5 0 0 0 - - -;
#X obj 326 -96 inlet coordinates;
#X obj 5 12 loadbang;
#X obj 199 -96 inlet trigger;
#X obj 134 -46 sel 1;
#X obj 134 33 list append;
#X obj 134 9 + 1;
#X obj 469 107 route 21 22 23 24 25 26 27 28 29 30;
#X obj 122 191 polygon 30 -------------------------------------------------
;
#X obj 190 -22 % 30;
#X msg 5 36 draw line;
#X connect 0 0 13 0;
#X connect 1 0 13 1;
#X connect 1 1 13 2;
#X connect 1 2 13 3;
#X connect 1 3 13 4;
#X connect 1 4 13 5;
#X connect 1 5 13 6;
#X connect 1 6 13 7;
#X connect 1 7 13 8;
#X connect 1 8 13 9;
#X connect 1 9 13 10;
#X connect 1 10 2 0;
#X connect 2 0 13 11;
#X connect 2 1 13 12;
#X connect 2 2 13 13;
#X connect 2 3 13 14;
#X connect 2 4 13 15;
#X connect 2 5 13 16;
#X connect 2 6 13 17;
#X connect 2 7 13 18;
#X connect 2 8 13 19;
#X connect 2 9 13 20;
#X connect 2 10 12 0;
#X connect 3 0 4 0;
#X connect 3 0 5 0;
#X connect 3 0 11 0;
#X connect 4 0 14 0;
#X connect 6 0 10 1;
#X connect 7 0 15 0;
#X connect 8 0 9 0;
#X connect 9 0 3 0;
#X connect 10 0 1 0;
#X connect 11 0 10 0;
#X connect 12 0 13 21;
#X connect 12 1 13 22;
#X connect 12 2 13 23;
#X connect 12 3 13 24;
#X connect 12 4 13 25;
#X connect 12 5 13 26;
#X connect 12 6 13 27;
#X connect 12 7 13 28;
#X connect 12 8 13 29;
#X connect 12 9 13 30;
#X connect 14 0 3 1;
#X connect 15 0 13 0;
#X restore 116 518 pd draw;
#X obj 214 493 pack f f f;
#X obj 250 449 t f b;
#X msg 277 471 0;
#X text 58 33 Draw a line following the movement;
#X text 15 85 between the detected points.;
#X text 16 71 We can follow the movement by drawing a line;
#X text 300 363 don't draw;
#X text 354 227 compares the current frame to the;
#X text 354 240 previous one;
#X obj 117 345 mn-flip;
#X obj 219 418 mn-coor_map;
#X msg 186 215 0.2;
#X obj 186 195 loadbang;
#X obj 117 253 pix_movement;
#X obj 311 18 declare -lib Gem;
#X text 17 626 Max Neupert \, GMU - Bauhaus Universität Weimar 2008-2012
;
#X text 58 20 Pure Data + Gem;
#X connect 1 0 16 0;
#X connect 2 0 16 0;
#X connect 3 0 4 0;
#X connect 4 0 11 0;
#X connect 5 0 6 0;
#X connect 11 0 42 0;
#X connect 14 0 38 0;
#X connect 14 1 39 0;
#X connect 14 2 39 1;
#X connect 14 3 18 0;
#X connect 15 0 28 0;
#X connect 18 0 28 1;
#X connect 19 0 42 1;
#X connect 26 0 14 0;
#X connect 27 0 26 1;
#X connect 29 0 28 2;
#X connect 30 0 29 1;
#X connect 30 1 31 0;
#X connect 31 0 29 2;
#X connect 38 0 5 0;
#X connect 39 0 29 0;
#X connect 39 1 30 0;
#X connect 40 0 19 0;
#X connect 41 0 40 0;
#X connect 42 0 26 0;