diff options
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | geom.hpp | 25 | ||||
-rw-r--r-- | problem.hpp | 39 |
3 files changed, 64 insertions, 1 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..eb95230 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +Projet de robotique pour le cours de JP Laumond 2014-2015. Alex Auvolat, Jean Fabre. @@ -28,7 +28,7 @@ struct line { line(double aa, double bb, double cc) : a(aa), b(bb), c(cc) {} - double dist(double x, double y) const { + double dist(vec p) const { // TODO return 1; } @@ -39,6 +39,17 @@ struct line { }; +struct segment { + vec a, b; + + segment(vec pa, vec pb) : a(pa), b(pb), {} + + double dist(vec p) const { + // TODO + return 1; + } +}; + struct circle { vec c; double r; @@ -58,4 +69,16 @@ struct circpoint { } }; +struct circarc { + circle c; + double theta1, theta2; + + circarc(circle cc, double tha, double thb) : c(cc), theta1(tha), theta2(thb) {} + + double dist(vec p) const { + // TODO + return 1; + } +}; + /* vim: set ts=4 sw=4 tw=0 noet :*/ diff --git a/problem.hpp b/problem.hpp new file mode 100644 index 0000000..535affa --- /dev/null +++ b/problem.hpp @@ -0,0 +1,39 @@ +#pragma once + +#include <vector> + +#include "geom.hpp" + +struct obstacle { + circle c; +}; + +struct hilare_a { // System A + // paramètres globaux + double l; + double r_c_car, r_c_trolley; + + // position actuelle + double x, y, theta, phi; + + vec pos_trolley() const { + //TODO + return vec(0, 0); + } +}; + +struct problem { + std::vector<obstacle> map; + + hilare_a begin_pos, end_pos; +}; + +struct solution { + std::vector<hilare_a> movement; + + // TODO : décrire mieux un mouvement entre deux points (donner + // le centre de rotation, l'angle, etc.) +}; + + +/* vim: set ts=4 sw=4 tw=0 noet :*/ |