diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/arap.cpp | 2 | ||||
-rw-r--r-- | src/ocean/ocean.cpp | 3 | ||||
-rw-r--r-- | src/ocean/ocean.h | 8 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/arap.cpp b/src/arap.cpp index 5d8a373..79fe475 100644 --- a/src/arap.cpp +++ b/src/arap.cpp @@ -67,7 +67,7 @@ void ARAP::update(double seconds) m_shape.setVertices(m_ocean.get_vertices()); m_time += m_timestep; -// std::cout << m_time << std::endl; + // std::cout << m_time << std::endl; } // Move an anchored vertex, defined by its index, to targetPosition diff --git a/src/ocean/ocean.cpp b/src/ocean/ocean.cpp index eabaa8e..bb33106 100644 --- a/src/ocean/ocean.cpp +++ b/src/ocean/ocean.cpp @@ -196,7 +196,7 @@ std::pair<double, double> ocean::amplitude_t // get dispersion from k std::pair<double, double> k = k_index_to_k_vector(k_index); double k_magnitude = sqrt(k.first * k.first + k.second * k.second); - double omega = omega_dispersion(k_magnitude); + double omega = omega_dispersion(k_magnitude, true); // calculate the complex exponential terms double omega_t = omega * t; @@ -234,6 +234,7 @@ std::vector<Eigen::Vector3f> ocean::get_vertices() //if (i < length) double amplitude = current_h[i].first; + // double amplitude = sqrt(current_h[i].first * current_h[i].first + current_h[i].second * current_h[i].second); // if (i < length) amplitude = initial_h[i].first; diff --git a/src/ocean/ocean.h b/src/ocean/ocean.h index b3197f8..2387d2a 100644 --- a/src/ocean/ocean.h +++ b/src/ocean/ocean.h @@ -23,12 +23,12 @@ public: private: - const int length = 256; // length of grid - const int width = 256; // width of grid + const int length = 81; // length of grid + const int width = 81; // width of grid const int N = length * width; // total number of grid points - const double A = 30; // numeric constant for the Phillips spectrum - const double V = 0.5; // wind speed + const double A = 10.0; // numeric constant for the Phillips spectrum + const double V = .25; // wind speed const std::pair<double, double> omega_wind = std::make_pair(1.0, 0.0); // wind direction |