Update.
authorFrancois Fleuret <francois@fleuret.org>
Thu, 2 Mar 2017 20:32:22 +0000 (21:32 +0100)
committerFrancois Fleuret <francois@fleuret.org>
Thu, 2 Mar 2017 20:32:22 +0000 (21:32 +0100)
sequence_generator.cc
test.py

index 540c574..0ebce0d 100644 (file)
@@ -218,7 +218,6 @@ extern "C" void fl_generate_sequence(int nb_images,
         for(int i = 0; i < nb_iterations_per_steps; i++) {
           scalar_t xf = grabbed_polygon->absolute_x(grab_relative_x, grab_relative_y);
           scalar_t yf = grabbed_polygon->absolute_y(grab_relative_x, grab_relative_y);
-          cout << "xf = " << xf << " yf = " << yf << endl;
           if (xf < 0 || xf >= world_width || yf < 0 || yf >= world_height) {
             failed = 1;
           }
@@ -227,10 +226,6 @@ extern "C" void fl_generate_sequence(int nb_images,
         }
       }
     }
-
-    if(failed) cout << "** FAILED" << endl;
-    else cout << "** DONE" << endl;
-
   } while(failed);
 
   for(int t = 0; t < nb_images; t++) {
diff --git a/test.py b/test.py
index 2853309..0a065fa 100755 (executable)
--- a/test.py
+++ b/test.py
@@ -42,6 +42,6 @@ def sequences_to_image(x, gap=1, gap_color = (0, 128, 255)):
 
 ######################################################################
 
-x = flatland.generate_sequence(1, 3, 80, 80, True, True)
+x = flatland.generate_sequence(10, 6, 80, 80, True, True)
 
 sequences_to_image(x, gap = 2, gap_color = (0, 0, 0)).save('sequences.png')