diff options
Diffstat (limited to 'src/ocean')
-rw-r--r-- | src/ocean/ocean_alt.cpp | 6 | ||||
-rw-r--r-- | src/ocean/ocean_alt.h | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/ocean/ocean_alt.cpp b/src/ocean/ocean_alt.cpp index 5dcfd74..20c663c 100644 --- a/src/ocean/ocean_alt.cpp +++ b/src/ocean/ocean_alt.cpp @@ -332,10 +332,12 @@ std::vector<Eigen::Vector3f> ocean_alt::get_vertices() // m_foam_constants.wavelengths[i] = 2.f* M_PI * m_slopes[i].dot(m_slopes[i]) / Lx; - m_foam_constants.wavelengths[i] = ((height -200 ) / (1000.f -200 )); + float h_0 = m_waveIndexConstants[i].h0_prime[0]; // min*.2f; + float h_max = max*.01f; // the smaller the constant, the more foam there is + m_foam_constants.wavelengths[i] = (height - h_0 ) / (h_max - h_0); // if (i < 5){ -// //std::cout << min << ", " << max << std::endl; +// std::cout << h_0 << ", " << h_max << std::endl; // std::cout << m_foam_constants.wavelengths[i] << std::endl; // } diff --git a/src/ocean/ocean_alt.h b/src/ocean/ocean_alt.h index ad6e69e..219ad60 100644 --- a/src/ocean/ocean_alt.h +++ b/src/ocean/ocean_alt.h @@ -75,14 +75,14 @@ private: - const double Lx = 512.0; - const double Lz = 512.0; + const double Lx = 1024.0; + const double Lz = 1024.0; const int num_rows = 256; const int num_cols = 256; const int N = num_rows*num_cols; // total number of grid points const double lambda = 2.5; // how much displacement matters - const double spacing = 75.0; // spacing between grid points + const double spacing = 25.0; // spacing between grid points const double A = 200; // numeric constant for the Phillips spectrum const double V = 200; // wind speed |