Implementar sistema de variación por rebote individual

- Corregir coeficiente base: ahora TODAS las pelotas tienen el mismo (0.75)
- Añadir constantes configurables en defines.h:
  * BASE_BOUNCE_COEFFICIENT = 0.75f (igual para todas)
  * BOUNCE_VARIATION_PERCENT = 0.05f (±5% por rebote)
  * LATERAL_LOSS_PERCENT = 0.02f (±2% pérdida lateral)
- Implementar funciones generateBounceVariation() y generateLateralLoss()
- Aplicar variación aleatoria en cada rebote individual:
  * Superficie de gravedad: rebote con ±5% variación
  * Otras superficies: pérdida lateral 0-2%
- Añadir pérdida lateral perpendicular en todos los rebotes
- Actualizar debug display para mostrar coeficiente LOSS

Efecto: Pelotas idénticas divergen gradualmente por variaciones microscópicas
acumulativas, eliminando sincronización de forma natural y realista.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-18 16:52:24 +02:00
parent dec8d431f5
commit 78656cf17d
5 changed files with 278 additions and 64 deletions

View File

@@ -46,6 +46,7 @@ class Ball {
float getVelocityY() const { return vy_; }
float getVelocityX() const { return vx_; }
float getGravityForce() const { return gravity_force_; }
float getLossCoefficient() const { return loss_; }
GravityDirection getGravityDirection() const { return gravity_direction_; }
bool isOnSurface() const { return on_surface_; }