From 0db091f76e0dc6c862e9b01ce6948eb0c79ba545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Oudin?= Date: Tue, 13 Feb 2018 22:45:29 +0100 Subject: [PATCH] Min_height evolves in time. --- Ball.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Ball.cpp b/Ball.cpp index 1e2496b..350f990 100644 --- a/Ball.cpp +++ b/Ball.cpp @@ -83,6 +83,8 @@ void Ball::update_pos(double dt) { _compute_T_n(); _compute_v_x(normal); _compute_v_z(normal); + min_height = fmin(radius, min_height + 0.2 * (radius - min_height)); + std::cout << "U:" << U << "\n"; max_t = (T - old_t)/2.0 + old_t; if (((A + B * max_t - (G_CTE / 2) * max_t * max_t + min_height) < radius)) {