| 9 | #include <iostream> |
| 10 | |
| 11 | int main() { |
| 12 | f2c::Random rand(42); |
| 13 | F2CField field = rand.generateRandField(1e4, 5); |
| 14 | F2CCells cells = field.getField(); |
| 15 | F2CRobot robot (2.0, 6.0); |
| 16 | |
| 17 | std::cout << "####### Tutorial 3.1 Constant width headland generator ######" << std::endl; |
| 18 | f2c::hg::ConstHL const_hl; |
| 19 | F2CCells no_hl = const_hl.generateHeadlands(cells, 3.0 * robot.getWidth()); |
| 20 | std::cout << "The complete area is " << cells.area() << |
| 21 | ", and the area without headlands is " << no_hl.area() << std::endl; |
| 22 | |
| 23 | f2c::Visualizer::figure(); |
| 24 | f2c::Visualizer::plot(field); |
| 25 | f2c::Visualizer::plot(no_hl); |
| 26 | f2c::Visualizer::save("Tutorial_3_1_Const_width.png"); |
| 27 | |
| 28 | return 0; |
| 29 | } |
| 30 |
nothing calls this directly
no test coverage detected