Exemple #1
0
float Lake::height(const Drop &drop,
                   unsigned int radius,
                   unsigned int timestep) const {
  unsigned int time_elapsed = timestep - drop.time();
  float distance = radius - wave_properties_.speed() * time_elapsed;
  return distance / std::exp(distance*distance + time_elapsed/10);
}
Exemple #2
0
inline float Lake::radius(const Drop &drop, unsigned int timestep) const {
  return wave_properties_.speed() * (timestep - drop.time());
}