#include "pch.h" #include #include #include /*Point getnext(double x, double y); using namespace std; struct Point { double x; double y; }; void Barnsley(int numberofpoints, std::string name) { std::ofstream out; out.open(name); if (out) { double x, y; x = 0, y = 0; for (int i = 0; i < numberofpoints; i++) { auto nextxy = getnext(x, y); out << nextxy.x << " " << nextxy.y << std::endl; x = nextxy.x; y = nextxy.y; } } out.close(); } Point getnext(double x, double y){ auto rnd = rand() % 100; if (rnd == 0) return Point(0, 0.16*y); //p4 case else if (rnd >= 1 && rnd <= 8) return Point(0.2*x - 0.26*y, 0.23*x + 0.22*y + 1.6); }*/