[Gridflow-cvs] [svn] commit: r6637 - in /trunk/doc/flow_classes: #polygon_area-help.pd #polygon_each_edge-help.pd #polygon_moment-help.pd #polygon_radial_map-help.pd

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Sun Feb 20 11:47:07 EST 2011


Author: matju
Date: Sun Feb 20 11:47:07 2011
New Revision: 6637

Log:
...

Modified:
    trunk/doc/flow_classes/#polygon_area-help.pd
    trunk/doc/flow_classes/#polygon_each_edge-help.pd
    trunk/doc/flow_classes/#polygon_moment-help.pd
    trunk/doc/flow_classes/#polygon_radial_map-help.pd

Modified: trunk/doc/flow_classes/#polygon_area-help.pd
==============================================================================
--- trunk/doc/flow_classes/#polygon_area-help.pd (original)
+++ trunk/doc/flow_classes/#polygon_area-help.pd Sun Feb 20 11:47:07 2011
@@ -1,6 +1,6 @@
-#N canvas 628 15 632 522 10;
+#N canvas 628 15 632 547 10;
 #X obj 0 0 doc_h;
-#X obj 0 493 doc_f;
+#X obj 0 513 doc_f;
 #X obj 58 239 #polygon_area;
 #X obj 59 259 display;
 #X msg 58 96 4 2 # 10 10 10 310 230 310 230 10;
@@ -13,16 +13,21 @@
 #X obj 58 77 loadbang;
 #X obj 14 379 doc_ii 0;
 #X obj 97 379 doc_m i0 grid;
-#X text 232 379 Vertices of the polygon.;
 #X obj 14 448 doc_oo 0;
 #X obj 97 448 doc_m o0 grid;
 #X text 232 448 Grid of only one element representing the area of the
 polygon received from inlet 0;
 #X obj 58 115 # +;
+#X obj 3 493 doc_also;
+#X obj 103 493 #polygon_perimetre;
+#X text 232 379 dim(vertices \, 2): polygon;
+#X obj 223 493 #polygon_moment;
 #X connect 2 0 3 0;
-#X connect 4 0 18 0;
+#X connect 4 0 17 0;
 #X connect 11 0 4 0;
-#X connect 13 1 14 0;
-#X connect 16 1 17 0;
-#X connect 18 0 2 0;
-#X connect 18 0 6 0;
+#X connect 13 1 20 0;
+#X connect 15 1 16 0;
+#X connect 17 0 2 0;
+#X connect 17 0 6 0;
+#X connect 18 1 19 0;
+#X connect 18 1 21 0;

Modified: trunk/doc/flow_classes/#polygon_each_edge-help.pd
==============================================================================
--- trunk/doc/flow_classes/#polygon_each_edge-help.pd (original)
+++ trunk/doc/flow_classes/#polygon_each_edge-help.pd Sun Feb 20 11:47:07 2011
@@ -1,22 +1,34 @@
-#N canvas 338 225 632 377 10;
+#N canvas 338 225 632 449 10;
 #X obj 51 139 #print;
 #X obj 51 83 # +;
 #X obj 51 102 #polygon_each_edge;
 #X obj 0 0 doc_h;
 #X obj 3 170 doc_c;
 #X obj 3 210 doc_i 1;
-#X obj 3 273 doc_o 1;
-#X obj 14 303 doc_oo 0;
+#X obj 3 333 doc_o 1;
+#X obj 14 363 doc_oo 0;
 #X obj 14 240 doc_ii 0;
-#X obj 0 348 doc_f;
+#X obj 0 415 doc_f;
 #X msg 51 48 4 2 # 0 0 0 20 20 20 20 0;
 #X obj 97 240 doc_m i0 grid;
-#X obj 97 303 doc_m o0 grid;
-#X text 232 240 Vertices of the polygon;
-#X text 232 303 Returns a grid contaning a vertex pair for each edge
-of the polygon.;
+#X obj 97 363 doc_m o0 grid;
+#X obj 3 395 doc_also;
+#X text 232 363 dim(2 \, 2): each pair of consecutive vertices in the
+polygon.;
+#X text 232 240 dim(N \, 2): a polygon. this will produce N grids dim(2
+\, 2) \, thus each vertex will appear twice (because each vertex belongs
+to two edges).;
+#X obj 103 395 #polygon_area;
+#X obj 193 395 #polygon_perimetre;
+#X obj 313 395 #polygon_moment;
+#X text 232 288 actually \, this can also be dim(N \, M): it works
+for paths in a space that has as many dimensions as you like.;
 #X connect 1 0 2 0;
 #X connect 2 0 0 0;
 #X connect 10 0 1 0;
-#X connect 11 1 13 0;
+#X connect 11 1 15 0;
+#X connect 11 1 19 0;
 #X connect 12 1 14 0;
+#X connect 13 1 16 0;
+#X connect 13 1 17 0;
+#X connect 13 1 18 0;

Modified: trunk/doc/flow_classes/#polygon_moment-help.pd
==============================================================================
--- trunk/doc/flow_classes/#polygon_moment-help.pd (original)
+++ trunk/doc/flow_classes/#polygon_moment-help.pd Sun Feb 20 11:47:07 2011
@@ -1,18 +1,17 @@
-#N canvas 678 0 632 610 10;
+#N canvas 539 151 632 669 10;
 #X msg 263 58 4 2 # 1 1 1 5 5 5 5 1;
 #X text 413 58 should give 3 3;
 #X obj 282 188 display;
 #X obj 203 219 #outer + (-4 4);
 #X obj 203 238 #transpose;
 #X obj 37 64 metro 42;
-#X obj 37 47 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+#X obj 37 47 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
 ;
 #X msg 37 83 240 320 3 #;
 #X obj 37 256 #out window;
 #X obj 37 122 #draw_polygon + (255 0 0);
 #X obj 37 219 #draw_rect + (255 255 0);
 #X obj 378 188 display;
-#X obj 377 168 #polygon_moment 2;
 #X obj 281 168 #polygon_moment;
 #X obj 263 77 # * (10 20);
 #X obj 263 96 #rotate;
@@ -26,7 +25,6 @@
 #X obj 14 427 doc_ii 1;
 #X obj 14 321 doc_cc 0;
 #X obj 97 321 doc_m c0 float;
-#X text 232 321 1: first-order moment (average);
 #X text 232 343 2: second-order moment (standard-deviation);
 #X obj 97 546 doc_m o0 grid;
 #X obj 97 405 doc_m i0 grid;
@@ -36,10 +34,18 @@
 ;
 #X text 232 471 but in the case of a standard-deviation \, you'd put
 the average in here \, unless you want a nonstandard deviation.;
-#X text 232 546 polygon. size (N 2);
-#X text 232 405 polygon. size (N 2);
-#X obj 0 578 doc_f;
-#X connect 0 0 14 0;
+#X obj 0 637 doc_f;
+#X obj 3 617 doc_also;
+#X obj 377 168 #polygon_moment 2;
+#X text 232 321 1: first-order moment (average) (default: 1);
+#X text 232 405 dim(vertices \, 2): polygon;
+#X text 232 546 dim(2): average position of all points in the polygon.
+this is like [#moment] on [#draw_polygon] but potentially more precise
+\, faster \, and you don't have to think about the size of the drawing
+surface.;
+#X obj 103 617 #polygon_area;
+#X obj 193 617 #polygon_perimetre;
+#X connect 0 0 13 0;
 #X connect 3 0 4 0;
 #X connect 4 0 10 2;
 #X connect 5 0 7 0;
@@ -47,18 +53,20 @@
 #X connect 7 0 9 0;
 #X connect 9 0 10 0;
 #X connect 10 0 8 0;
-#X connect 12 0 11 0;
-#X connect 13 0 2 0;
-#X connect 13 0 3 0;
-#X connect 14 0 15 0;
-#X connect 15 0 9 2;
-#X connect 15 0 13 0;
-#X connect 15 0 12 0;
-#X connect 16 0 15 1;
-#X connect 25 1 26 0;
-#X connect 25 1 27 0;
-#X connect 28 1 34 0;
-#X connect 29 1 35 0;
-#X connect 30 1 31 0;
-#X connect 30 1 32 0;
-#X connect 30 1 33 0;
+#X connect 12 0 2 0;
+#X connect 12 0 3 0;
+#X connect 13 0 14 0;
+#X connect 14 0 9 2;
+#X connect 14 0 12 0;
+#X connect 14 0 34 0;
+#X connect 15 0 14 1;
+#X connect 24 1 35 0;
+#X connect 24 1 25 0;
+#X connect 26 1 37 0;
+#X connect 27 1 36 0;
+#X connect 28 1 29 0;
+#X connect 28 1 30 0;
+#X connect 28 1 31 0;
+#X connect 33 1 38 0;
+#X connect 33 1 39 0;
+#X connect 34 0 11 0;

Modified: trunk/doc/flow_classes/#polygon_radial_map-help.pd
==============================================================================
--- trunk/doc/flow_classes/#polygon_radial_map-help.pd (original)
+++ trunk/doc/flow_classes/#polygon_radial_map-help.pd Sun Feb 20 11:47:07 2011
@@ -1,4 +1,4 @@
-#N canvas 486 64 632 526 10;
+#N canvas 805 217 632 642 10;
 #X obj 244 185 #polygon_radial_map;
 #X text 70 40 makes a 1-D panoramic (polar) rendering of a polygon.
 ;
@@ -13,10 +13,9 @@
 #X obj 244 242 #for 128 0 -1;
 #X obj 24 259 #out window;
 #X obj 244 140 #t;
-#X obj 274 141 #polygon_moment;
 #X obj 293 162 display;
 #X obj 244 166 # -;
-#X obj 392 184 display;
+#X obj 392 183 display;
 #X msg 24 116 4 2 # 30 30 30 250 120 200 170 90;
 #X obj 244 204 t a a;
 #X obj 244 223 #finished;
@@ -24,32 +23,44 @@
 #X obj 0 0 doc_h;
 #X obj 3 333 doc_c 0;
 #X obj 3 373 doc_i 1;
-#X obj 3 435 doc_o 1;
-#X obj 14 465 doc_oo 0;
+#X obj 3 457 doc_o 1;
+#X obj 14 487 doc_oo 0;
 #X obj 14 403 doc_ii 0;
-#X obj 0 497 doc_f;
-#X obj 97 465 doc_m o0 grid;
+#X obj 0 630 doc_f;
+#X obj 97 487 doc_m o0 grid;
 #X obj 97 403 doc_m i0 grid;
-#X text 232 403 polygon;
-#X text 232 465 radial map;
-#X connect 0 0 16 0;
+#X obj 3 610 doc_also;
+#X obj 274 141 #polygon_moment;
+#X obj 97 425 doc_m i0 precision;
+#X text 232 425 number of elements in output;
+#X text 232 487 dim(precision): radial map. for each angle 36000*a/precision
+\, it gives the radius of the polygon in that direction. this only
+works reliably when all edges go in the same direction in polar coords
+(all clockwise or all counterclockwise). thus it works on all convex
+polygons as long as the origin is inside \, but it also works on many
+concave polygons as long as you pick the origin appropriately.;
+#X obj 103 610 #polygon_comparator;
+#X text 232 403 dim(vertices \, 2): polygon;
+#X connect 0 0 15 0;
 #X connect 3 0 4 0;
 #X connect 5 0 7 0;
 #X connect 5 1 6 2;
 #X connect 6 0 9 0;
 #X connect 7 0 6 0;
-#X connect 8 0 18 0;
-#X connect 10 0 13 0;
-#X connect 10 1 11 0;
-#X connect 11 0 12 0;
-#X connect 11 0 13 1;
-#X connect 13 0 0 0;
-#X connect 13 0 14 0;
-#X connect 15 0 5 0;
-#X connect 15 0 10 0;
-#X connect 16 0 17 0;
-#X connect 16 1 18 1;
-#X connect 17 0 8 0;
-#X connect 18 0 3 0;
-#X connect 26 1 29 0;
-#X connect 27 1 28 0;
+#X connect 8 0 17 0;
+#X connect 10 0 12 0;
+#X connect 10 1 28 0;
+#X connect 12 0 0 0;
+#X connect 12 0 13 0;
+#X connect 14 0 5 0;
+#X connect 14 0 10 0;
+#X connect 15 0 16 0;
+#X connect 15 1 17 1;
+#X connect 16 0 8 0;
+#X connect 17 0 3 0;
+#X connect 25 1 31 0;
+#X connect 26 1 33 0;
+#X connect 27 1 32 0;
+#X connect 28 0 11 0;
+#X connect 28 0 12 1;
+#X connect 29 1 30 0;



More information about the Gridflow-cvs mailing list