#include <iostream>
#include <fstream>
#include <string>
#include <filesystem>
#include "mytools2.hpp"
using namespace std;
using TMU::R2;
int main(){
    string dir = "res";
    int N = 128+1;
    double h = 2*3.1415/N;
    double x=0.5;
    double y=0;

    filesystem::create_directories(dir);
    
    for(int i=0;i<N;++i){
        x = x - y*h; y = y + x*h;

        TMU::SVGGraph o;
        o.setPointSize(0.01);
        o.drawVAxis("Vertical axis");
        o.drawHAxis("Horizontal axis");
    	o.circle(R2(x, y));
        string fname= dir + "/graph_" + to_string(i) + ".svg";
	    ofstream of(fname);
    	of << o.serialize();
    }

	return 0;
}
