2 * SPDX-FileCopyrightText: 2021 Jiri Vlasak <jiri.vlasak.2@cvut.cz>
4 * SPDX-License-Identifier: GPL-3.0-only
16 #define INIT_V vector<M> V;
17 #define P(W) V.push_back(M(#W)); V.back().o.W = true;
24 bcar::BicycleCar::GenPlotOpts o;
28 this->c.gen_gnuplot_to(this->f, this->o);
36 M(std::string fn) : fn(fn)
38 this->f.open(this->fn);
41 M(M const& m) : fn(m.fn), c(m.c), o(m.o)
43 this->f.open(this->fn);
50 friend void swap(M& f, M& t)
68 gpl_slot(bcar::ParkingSlot& s, std::string fn = "")
70 if (fn.compare("") == 0) {
81 gen_pl_script(std::vector<M>& ms, std::string with_slot)
86 f << "#!/usr/bin/gnuplot" << endl;
87 f << "set size ratio -1" << endl;
88 if (with_slot.compare("") != 0) {
89 f << "plot '" << with_slot << "' w l,";
94 f << " '" << m.fn << "'" << " w l,";
97 f << "pause -1" << endl;
108 bcar::ParkingSlot s(bcar::Point(0, 0), 0, 2.5, 6);
112 s.fe(bcar::BicycleCar());
122 m.c = s._entries.front();
123 m.c.st(m.c.st() * -1.0);
125 for (unsigned int i = 0; i < STEPS; i++) {
130 gen_pl_script(V, sn);