| 105 | } |
| 106 | |
| 107 | int main() { |
| 108 | |
| 109 | const std::array barnsley_hutchinson = { |
| 110 | Op{Row{0.0, 0.0, 0.0}, Row{0.0, 0.16, 0.0}, Row{0.0, 0.0, 1.0}}, |
| 111 | Op{Row{0.85, 0.04, 0.0}, Row{-0.04, 0.85, 1.60}, Row{0.0, 0.0, 1.0}}, |
| 112 | Op{Row{0.20, -0.26, 0.0}, Row{0.23, 0.22, 1.60}, Row{0.0, 0.0, 1.0}}, |
| 113 | Op{Row{-0.15, 0.28, 0.0}, Row{0.26, 0.24, 0.44}, Row{0.0, 0.0, 1.0}}}; |
| 114 | |
| 115 | const std::array barnsley_probabilities = {0.01, 0.85, 0.07, 0.07}; |
| 116 | auto output_points = chaos_game( |
| 117 | 10'000, Vec2{0, 0}, barnsley_hutchinson, barnsley_probabilities); |
| 118 | |
| 119 | std::ofstream ofs("out.dat"); |
| 120 | for (auto pt : output_points) |
| 121 | ofs << pt[0] << '\t' << pt[1] << '\n'; |
| 122 | } |
nothing calls this directly
no test coverage detected