/*
- * 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 <francois.fleuret@idiap.ch>
- *
- * 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 <http://www.gnu.org/licenses/>.
- *
- */
+
+ flatland is a simple 2d physical simulator
+
+ Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/
+ Written by Francois Fleuret <francois.fleuret@idiap.ch>
+
+ 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 <http://www.gnu.org/licenses/>.
+
+*/
#include <iostream>
#include <fstream>
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++) {
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);
//////////////////////////////////////////////////////////////////////
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;