X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=flatland.git;a=blobdiff_plain;f=sequence_generator.cc;h=2fa39120b26b6636bcf6e67b68047984cb792eff;hp=5caae66c807f1f230d7311b7a03ca9ddae9ce163;hb=db40d75f91d5d332b475a260df8c034103159286;hpb=90d1c5704c30e7f1d041e32eacbc2893741110e1 diff --git a/sequence_generator.cc b/sequence_generator.cc index 5caae66..2fa3912 100644 --- a/sequence_generator.cc +++ b/sequence_generator.cc @@ -1,26 +1,26 @@ /* - * dyncnn is a deep-learning algorithm for the prediction of - * interacting object dynamics - * - * Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/ - * Written by Francois Fleuret - * - * This file is part of dyncnn. - * - * dyncnn is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 3 as - * published by the Free Software Foundation. - * - * dyncnn is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with dyncnn. If not, see . - * - */ + + flatland is a simple 2d physical simulator + + Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/ + Written by Francois Fleuret + + This file is part of flatland + + flatland is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3 as + published by the Free Software Foundation. + + flatland is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with flatland. If not, see . + +*/ #include #include @@ -50,7 +50,7 @@ void draw_universe_on_canvas(CanvasCairo *canvas, scalar_t scaling, void draw_grabbing_point_on_canvas(CanvasCairo *canvas, scalar_t scaling, scalar_t xg, scalar_t yg, scalar_t r, scalar_t g, scalar_t b) { - scalar_t radius = 1/scaling; + scalar_t radius = 1 / scaling; int n = 36; scalar_t xp[n], yp[n]; for(int k = 0; k < n; k++) { @@ -77,8 +77,8 @@ extern "C" void fl_generate_sequence(int nb_images, const scalar_t world_height = height * super_definition; const scalar_t scaling = 1 / super_definition; - int nb_iterations_per_dt = 50; - scalar_t dt = 5.0 / scalar_t(nb_iterations_per_dt); + int nb_iterations_per_dt = 100; + scalar_t dt = 10.0 / scalar_t(nb_iterations_per_dt); ////////////////////////////////////////////////////////////////////// @@ -142,9 +142,9 @@ extern "C" void fl_generate_sequence(int nb_images, scalar_t shape_size; if(random_shape_size) { - shape_size = 80 + 80 * drand48(); + shape_size = (10 + 10 * drand48()) * super_definition; } else { - shape_size = 120; + shape_size = 15 * super_definition; } scalar_t red, green, blue;