From eb8af873097ce73a22139db4924ebd41d766f011 Mon Sep 17 00:00:00 2001 From: jjesswan Date: Mon, 6 May 2024 20:29:14 -0400 Subject: foam done --- src/ocean/ocean_alt.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/ocean') diff --git a/src/ocean/ocean_alt.cpp b/src/ocean/ocean_alt.cpp index feed479..5dcfd74 100644 --- a/src/ocean/ocean_alt.cpp +++ b/src/ocean/ocean_alt.cpp @@ -280,7 +280,7 @@ Eigen::Vector2d ocean_alt::complex_exp(double exponent){ std::vector ocean_alt::get_vertices() { std::vector vertices = std::vector(); - if (iterations < 4){ + if (iterations < 10){ for (int i = 0; i < N; i++){ Eigen::Vector2d amplitude = m_current_h[i]; float height = amplitude[0]; @@ -331,8 +331,13 @@ std::vector ocean_alt::get_vertices() Eigen::Vector2i m_n = index_1d_to_2d(i); - m_foam_constants.wavelengths[i] = 1.f;//(height - 0) / (max -0);//M_PI * m_slopes[i].dot(m_slopes[i]) / ((float) m_n[0] / Lx); - //std::cout << m_foam_constants.wavelengths[i] << std::endl; + // 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 )); + +// if (i < 5){ +// //std::cout << min << ", " << max << std::endl; +// std::cout << m_foam_constants.wavelengths[i] << std::endl; +// } -- cgit v1.2.3-70-g09d2