- m_dots.emplace_back( std::make_unique<Dot>(m_surface->at(0, 0), 939.85) );
- m_dots.emplace_back( std::make_unique<Dot>(m_surface->at(0, 10), 704.09) );
- m_dots.emplace_back( std::make_unique<Dot>(m_surface->at(0, 20), 469.92) );
- m_dots.emplace_back( std::make_unique<Dot>(m_surface->at(0, 30), 352.04) );
- m_dots.emplace_back( std::make_unique<Dot>(m_surface->at(0, 40), 279.42) );
+ srand (time(NULL));
+
+ const std::vector<double> frequencies = {939.85, 704.09, 469.92, 352.04, 279.42, 1054.94, 704.09, 527.47, 418.65, 313.64};
+
+ for (const auto& frequency : frequencies) {
+ const std::array<int, 2> pos =
+ { rand() % m_surface->size(), rand() % m_surface->size() };
+ m_posDots.emplace_back(
+ PosDot{pos, std::make_unique<Dot>(m_surface->at(pos[0], pos[1]), frequency)} );
+ }
+
+ // m_dots.emplace_back( std::make_unique<Dot>(m_surface->at(10, 50), 939.85) );
+ // m_dots.emplace_back( std::make_unique<Dot>(m_surface->at(20, 40), 704.09) );
+ // m_dots.emplace_back( std::make_unique<Dot>(m_surface->at(30, 30), 469.92) );
+ // m_dots.emplace_back( std::make_unique<Dot>(m_surface->at(40, 20), 352.04) );
+ // m_dots.emplace_back( std::make_unique<Dot>(m_surface->at(50, 10), 279.42) );