diff --git a/doc/gabarit/calibrage.pdf b/doc/gabarit/calibrage.pdf index f017260..a958034 100644 Binary files a/doc/gabarit/calibrage.pdf and b/doc/gabarit/calibrage.pdf differ diff --git a/src/generateur/drawbot.pro b/src/generateur/drawbot.pro index cf4685b..f59df08 100644 --- a/src/generateur/drawbot.pro +++ b/src/generateur/drawbot.pro @@ -3,7 +3,7 @@ ###################################################################### QT += widgets TEMPLATE = app -TARGET = drawbot +TARGET = generateur DEPENDPATH += . INCLUDEPATH += . diff --git a/src/generateur/mainwin.cpp b/src/generateur/mainwin.cpp index 8cad3c3..0653bec 100644 --- a/src/generateur/mainwin.cpp +++ b/src/generateur/mainwin.cpp @@ -31,13 +31,11 @@ MainWin::MainWin(QWidget *parent) : QMainWindow(parent) } void MainWin::writeSettings() { - QSettings settings("./mainwindow.ini", QSettings::IniFormat); + QSettings settings("./prefs.ini", QSettings::IniFormat); settings.clear(); settings.beginGroup("MainWindow"); - settings.setValue("size", size()); - settings.setValue("pos", pos()); - settings.setValue("maximized", isMaximized()); + settings.setValue("pos", pos()); settings.endGroup(); settings.beginGroup("Fichiers"); @@ -52,20 +50,10 @@ void MainWin::writeSettings() void MainWin::readSettings() { - QSettings settings("./mainwindow.ini", QSettings::IniFormat); + QSettings settings("./prefs.ini", QSettings::IniFormat); settings.beginGroup("MainWindow"); - if(settings.value("maximized").toBool()) - { - resize(800,400); - move(200, 200); - showMaximized (); - } - else - { - resize(settings.value("size", QSize(800, 400)).toSize()); move(settings.value("pos", QPoint(200, 200)).toPoint()); - } settings.endGroup(); settings.beginGroup("Fichiers"); @@ -191,14 +179,12 @@ void MainWin::setTitle(const QString &fileName) else shownName = QFileInfo(fileName).absoluteFilePath(); - setWindowTitle(tr("%1[*] - %2").arg(shownName).arg(tr("Tableau Blanc"))); -// qDebug() << "setTitle"; + setWindowTitle(tr("%1[*] - %2").arg(shownName).arg(tr("Générateur de points"))); } void MainWin::setStatus(const QString &msg){ - // statusBar()->showMessage(msg); infoStatus->setText(msg); } void MainWin::about() -{ QMessageBox::information(this, tr("A Propos"), tr("Tableau Blanc\nDessin à main levée\nAvec sérialisation")); } +{ QMessageBox::information(this, tr("A Propos"), tr("Point List Generator\nDrawbot\nhttps://github.com/HE-Arc/drawbot")); } diff --git a/src/generateur/sheet.cpp b/src/generateur/sheet.cpp index 1c520c4..b94eeee 100644 --- a/src/generateur/sheet.cpp +++ b/src/generateur/sheet.cpp @@ -6,7 +6,7 @@ Sheet::Sheet(QWidget *parent) : QWidget(parent) { fileNew(); mag = 3; // 3px for 1mm on the robot - setWindowTitle("Sans Titre[*] - Dessin pour drawbot Arc"); + setWindowTitle("Sans Titre[*] - Generateur de points"); setFixedSize(297*mag,210*mag); } @@ -113,8 +113,8 @@ void Sheet::readFile() x = c[0].toDouble(); y = c[1].toDouble(); - x = x*mag + 148.5*mag; - y = -y*mag + 210*mag; + x = (x*mag/100 + 148.5*mag); + y = (-y*mag/100 + 210*mag); p = QPoint(x, y); qDebug() << p; @@ -161,12 +161,12 @@ void Sheet::save() } QTextStream sout(&fileDest); - double x, y; - sout << "double liste[] = {" << endl; + int x, y; + sout << " const int liste[] PROGMEM = {" << endl; foreach(QPoint p, liste) { // Chgt coordonnées widget -> feuille - x = (p.x() - 148.5*mag)/mag; - y = (210*mag - p.y())/mag; + x = 100*(p.x() - 148.5*mag)/mag; + y = 100*(210*mag - p.y())/mag; sout << QString::number(x) << ", " << QString::number(y) << ", " << endl; } sout << "};" << endl; diff --git a/src/generateur/sheet.h b/src/generateur/sheet.h index 22209ad..94c7c33 100644 --- a/src/generateur/sheet.h +++ b/src/generateur/sheet.h @@ -13,9 +13,6 @@ class Sheet : public QWidget Q_OBJECT public: Sheet(QWidget *parent = 0); -// ~Sheet(); -// QString getFileName(); -// QStringList getFileNames(); public slots: void fileNew(); @@ -43,7 +40,6 @@ class Sheet : public QWidget QStack pileUndo; double zoom, mag; QString fileName; - //MainWin* mw; void updateStatus(); signals: diff --git a/src/programme/cinematique.h b/src/programme/cinematique.h index 4fec810..5d33771 100644 --- a/src/programme/cinematique.h +++ b/src/programme/cinematique.h @@ -1,5 +1,5 @@ -bool isInside(double x, double y){ +bool isInside(float x, float y){ if( xdelta) { if (angle1 > old1) { - for (double i=old1; idelta) { if (angle2 > old2) { - for (double i=old2; i #include #include #include @@ -8,29 +9,29 @@ const int VITESSE=0; // Pause en ms après un mouvement const int ANGLE_MIN=5; // si angle2 < ANGLE_MIN collision avant-bras avec bras const int MIN_US=550, MAX_US=2350; // Commande servo en us (tester 700-2300) const int COR_X=5, COR_Y=12; // Corrections x,y -double COR_S1=16.8, COR_S2=-3.4; // Correction angle servos en degrés -const double SHIFT_S1_ANGLE=7.5; -const double MIN_X=-130; -const double MAX_X=130; -const double MIN_Y=10; -const double MAX_Y=205; +float COR_S1=16.8, COR_S2=-3.4; // Correction angle servos en degrés +const float SHIFT_S1_ANGLE=7.5; +const float MIN_X=-130; +const float MAX_X=130; +const float MIN_Y=10; +const float MAX_Y=205; // VARIABLES Servo s1, s2; // s1: épaule (en A), s2: coude (en B) -double lg1=149, lg2=130; // longueur des bras (mm) lg1 = AB (bras), lg2 = BC (avant-bras) -double angle1, angle2; // position servos en degrés de s1 et s2 -double old1, old2; // position précédente des angles -double pas = 0.5; // distance souhaitée en mm entre 2 points -double par = M_PI/180; // angle en radians entre deux calculs de points (1°) +float lg1=149, lg2=130; // longueur des bras (mm) lg1 = AB (bras), lg2 = BC (avant-bras) +float angle1, angle2; // position servos en degrés de s1 et s2 +float old1, old2; // position précédente des angles +float pas = 0.5; // distance souhaitée en mm entre 2 points +float par = M_PI/180; // angle en radians entre deux calculs de points (1°) bool microsec = true; // Mode précis (0.1°) si true bool debug = true; // Affiche les déplacements dans le moniteur série -void log(char msg[], double t, double x, double y){ +void log(char msg[], float t, float x, float y){ Serial.print(msg);Serial.print(" - t:");Serial.print(t);Serial.print(":(");Serial.print(x); Serial.print(","); Serial.print(y);Serial.println(")"); } -void log(double x, double y){ +void log(float x, float y){ Serial.print("angles: S1:");Serial.print(angle1);Serial.print(" S2:");Serial.println(angle2); Serial.print(" (x,y) : (");Serial.print(x);Serial.print(",");Serial.print(y);Serial.println(")\n"); } @@ -55,7 +56,6 @@ void lectureCorrectif(){ Serial.print("EEPROM:Epaule=");Serial.print(epaule);Serial.print(", Coude=");Serial.print(coude); Serial.print(", Cor en us : (");Serial.print(cor_epaule);Serial.print(",");Serial.print(cor_coude); Serial.print("), Cor en degrés : (");Serial.print(COR_S1);Serial.print(",");Serial.print(COR_S2); Serial.print(")"); - Serial.println("ok");Serial.println("ok");Serial.println("ok");Serial.println("ok");Serial.println("ok");Serial.println("ok"); - +// Serial.println("ok");Serial.println("ok");Serial.println("ok");Serial.println("ok");Serial.println("ok");Serial.println("ok"); } diff --git a/src/programme/dessins.h b/src/programme/dessins.h index ec8d1b0..7b934b0 100644 --- a/src/programme/dessins.h +++ b/src/programme/dessins.h @@ -1,9 +1,10 @@ +// Jusqu'à la ligne 130, le code est identique à simulateur/dessins.pde // https://en.wikipedia.org/wiki/Hypotrochoid -void etoile(double cx=0, double cy=100, double r=50) // étoile à 5 branches +void etoile(float cx, float cy, float r) // étoile à 5 branches { - double x,y; - double r1=r, r2=r*3/5, d=r; - for (double t = 0; t<6*PI; t+=par) { + float x,y; + float r1=r, r2=r*3/5, d=r; + for (float t = 0; t<6*PI; t+=par) { x = cx + (r1-r2)*cos(t) + d*cos((r1-r2)/r2 * t); y = cy + (r1-r2)*sin(t) - d*sin((r1-r2)/r2 * t); toAngle(x,y); @@ -12,13 +13,15 @@ void etoile(double cx=0, double cy=100, double r=50) // étoile à 5 branches } } +void etoile() { etoile(0, 100, 50); } + // https://en.wikipedia.org/wiki/Epicycloid -void fleur(double cx=0, double cy=130, double rTotal=40, double k=3)//, double a=16, double b=10) // rosace +void fleur(float cx, float cy, float rTotal, float k) // rosace { - double rCircleOut=rTotal/(k+1.0); - double rCircleIn=rCircleOut*k; - double x,y; - for (double t = 0; t<2*PI; t+=par) { + float rCircleOut=rTotal/(k+1.0); + float rCircleIn=rCircleOut*k; + float x,y; + for (float t = 0; t<2*PI; t+=par) { x = cx+(rCircleIn + rCircleOut)*cos(t) - rCircleOut*cos((rCircleIn/rCircleOut + 1)* t); y = cy + (rCircleIn + rCircleOut)*sin(t) - rCircleOut*sin((rCircleIn/rCircleOut + 1)*t); toAngle(x,y); @@ -27,14 +30,16 @@ void fleur(double cx=0, double cy=130, double rTotal=40, double k=3)//, double a } } +void fleur() { fleur(0, 130, 40, 3); } + // Coeur de Raphaël Laporte // http://www.les-mathematiques.net/phorum/read.php?8,418124,418399 -void coeur(double cx=0, double cy=130, double r=40) +void coeur(float cx, float cy, float r) { - double x,y; - double taille=50; + float x,y; + float taille=50; cy=cy+2.0*r*1.5/5.0; - for (double t = 0; t<2*PI; t+=par) { + for (float t = 0; t<2*PI; t+=par) { x = cx + r*(sin(t)*sin(t)*sin(t)); y = cy + r*cos(t) - r*(cos(t)*cos(t)*cos(t)*cos(t)); toAngle(x,y); @@ -43,10 +48,12 @@ void coeur(double cx=0, double cy=130, double r=40) } } -void cercle(double cx=0, double cy=100, double r=30) +void coeur() { coeur(0, 130, 40); } + +void cercle(float cx, float cy, float r) { - double x,y; - for (double t = 0; t<2*PI; t+=par) { + float x,y; + for (float t = 0; t<2*PI; t+=par) { x = r * cos(t) + cx; y = r * sin(t) + cy; toAngle(x,y); @@ -55,9 +62,11 @@ void cercle(double cx=0, double cy=100, double r=30) } } -void spirale(double cx=0, double cy=100, double cr=50, double pas=5) +void cercle() {cercle(0, 100, 30);} + +void spirale(float cx, float cy, float cr, float pas) { - double x,y, ppd = pas/360; // pas par degré + float x,y, ppd = pas/360; // pas par degré while (cr>3) { for(int t=0; t<360; t++){ @@ -72,13 +81,15 @@ void spirale(double cx=0, double cy=100, double cr=50, double pas=5) } } -void droite(double x1, double y1, double x2, double y2){ - double distance = sqrt(sq(x2-x1)+sq(y2-y1)); - double step = pas; // d en mm - int nbPoints = 1 + distance/step; - double dx=(x2-x1)/nbPoints; - double dy=(y2-y1)/nbPoints; - double x=x1, y=y1; +void spirale() { spirale(0, 100, 50, 5); } + +void droite(float x1, float y1, float x2, float y2){ + float distance = sqrt(sq(x2-x1)+sq(y2-y1)); + float step = pas; // d en mm + int nbPoints = (int)(1 + distance/step); + float dx=(x2-x1)/nbPoints; + float dy=(y2-y1)/nbPoints; + float x=x1, y=y1; for (int i=0; i 1er point du dessin ??? - determiner valeur min S2 pour éviter collision entre les 2 bras => protéger dans toAngle() interactions avec le clavier ? - taille max d'une liste de points ? https://www.arduino.cc/en/Reference/PROGMEM ? downcaster doubles ? Terminer mire : dessin segment et retour eviter positionnement avec attach (program.ino:9-10) - + incliner bras -40° pour augmenter couverture + TESTER : Ralentissement du déplacement si deltaAngle > 3° (décommenter cinematique.h:60-92) + +OK: lecture du zero dans eprom pos et taille figures - + taille max d'une liste de points ? => 5700 pts x int x int (22'800 bytes / 30720 progmem) + determiner valeur min S2 pour éviter collision entre les 2 bras => protéger dans toAngle() Correctifs origine et angles ->ok Limiter déplacement à feuille ->ok simplifier droite()->ok @@ -53,6 +55,8 @@ gerald.huguenin@he-arc.ch et david.grunenwald@he-arc.ch */ + +// Pour tester les servos while(true) { s1.write(0);Serial.println("0");delay(1000); s1.write(90);Serial.println("90");delay(1000); diff --git a/src/programme/liste.h b/src/programme/liste.h index 73cf323..918ece0 100644 --- a/src/programme/liste.h +++ b/src/programme/liste.h @@ -1,1311 +1,767 @@ -double liste[] = { --135.5, 203.667, --135.833, 203.667, --136.5, 203, --137.167, 202.333, --137.5, 202.333, --137.833, 201.333, --138.167, 200.667, --138.5, 200.333, --138.833, 199, --138.833, 198.333, --138.833, 197, --138.833, 196, --138.833, 195.333, --138.833, 193.667, --138.5, 193, --138.5, 192.667, --138.5, 192.333, --138.167, 191.667, --138.167, 191, --137.833, 190.667, --137.833, 190.333, --137.5, 190, --137.5, 189.667, --137.5, 189.333, --137.167, 189.333, --137.167, 189, --136.833, 188.667, --136.833, 188.333, --136.5, 188.333, --136.5, 188.333, + const int liste[] PROGMEM = { +-11916, 15200, +-11850, 15200, +-11816, 15233, +-11783, 15266, +-11716, 15300, +-11683, 15333, +-11616, 15366, +-11583, 15400, +-11550, 15466, +-11450, 15533, +-11416, 15566, +-11383, 15633, +-11316, 15733, +-11283, 15800, +-11250, 15900, +-11216, 15966, +-11183, 16066, +-11183, 16166, +-11183, 16233, +-11183, 16366, +-11183, 16500, +-11183, 16600, +-11183, 16700, +-11183, 16766, +-11216, 16866, +-11283, 16966, +-11316, 17033, +-11350, 17133, +-11416, 17200, +-11450, 17266, +-11483, 17366, +-11550, 17433, +-11583, 17466, +-11650, 17533, +-11716, 17600, +-11750, 17633, +-11816, 17666, +-11850, 17733, +-11883, 17766, +-11916, 17766, +-11983, 17800, +-12016, 17833, +-12050, 17833, +-12083, 17833, +-12083, 17800, +-12083, 17733, +-12083, 17666, +-12083, 17533, +-12083, 17400, +-12083, 17233, +-12050, 17066, +-11983, 16866, +-11916, 16700, +-11850, 16533, +-11816, 16366, +-11750, 16200, +-11683, 16033, +-11650, 15866, +-11616, 15700, +-11583, 15533, +-11550, 15366, +-11516, 15200, +-11483, 15066, +-11483, 14966, +-11450, 14866, +-11416, 14733, +-11416, 14633, +-11383, 14533, +-11383, 14433, +-11383, 14366, +-11350, 14300, +-11350, 14233, +-11350, 14200, +-11350, 14133, +-11350, 14066, +-11350, 14000, +-11316, 13933, +-11316, 13866, +-11316, 13800, +-11316, 13766, +-11316, 13733, +-11316, 13700, +-11316, 13666, +-11316, 13700, +-11316, 13733, +-11316, 13766, +-11316, 13800, +-11283, 13833, +-11283, 13866, +-11283, 13933, +-11283, 13966, +-11283, 14033, +-11250, 14066, +-11250, 14100, +-11250, 14133, +-11250, 14166, +-11250, 14200, +-11216, 14233, +-11216, 14266, +-11183, 14333, +-11150, 14400, +-11116, 14433, +-11083, 14466, +-11083, 14500, +-11050, 14533, +-11016, 14566, +-10983, 14600, +-10950, 14600, +-10916, 14633, +-10883, 14666, +-10850, 14666, +-10816, 14666, +-10783, 14666, +-10750, 14666, +-10716, 14666, +-10683, 14666, +-10650, 14666, +-10650, 14633, +-10616, 14600, +-10583, 14600, +-10583, 14566, +-10550, 14533, +-10516, 14500, +-10483, 14433, +-10450, 14400, +-10416, 14366, +-10383, 14333, +-10383, 14266, +-10350, 14233, +-10350, 14166, +-10316, 14100, +-10316, 14066, +-10316, 14000, +-10283, 13933, +-10283, 13900, +-10283, 13833, +-10283, 13800, +-10283, 13766, +-10283, 13733, +-10283, 13700, +-10283, 13666, +-10283, 13633, +-10283, 13600, +-10250, 13600, +-10216, 13600, +-10183, 13600, +-10150, 13600, +-10083, 13600, +-10050, 13600, +-9983, 13600, +-9950, 13600, +-9883, 13600, +-9850, 13600, +-9783, 13600, +-9716, 13633, +-9683, 13666, +-9616, 13733, +-9550, 13766, +-9516, 13866, +-9483, 13900, +-9416, 14000, +-9416, 14033, +-9350, 14133, +-9283, 14266, +-9216, 14333, +-9150, 14433, +-9116, 14500, +-9050, 14633, +-9016, 14700, +-8983, 14733, +-8983, 14766, +-8983, 14833, +-8983, 14866, +-9016, 14933, +-9050, 14933, +-9083, 14966, +-9150, 14966, +-9183, 14966, +-9250, 14966, +-9316, 14966, +-9350, 14966, +-9383, 14966, +-9450, 14966, +-9450, 14933, +-9483, 14900, +-9516, 14866, +-9516, 14833, +-9550, 14766, +-9550, 14733, +-9550, 14700, +-9550, 14633, +-9550, 14600, +-9550, 14533, +-9550, 14466, +-9550, 14400, +-9550, 14333, +-9550, 14266, +-9516, 14200, +-9483, 14133, +-9483, 14100, +-9450, 14033, +-9450, 14000, +-9416, 13966, +-9383, 13933, +-9383, 13900, +-9350, 13900, +-9316, 13866, +-9283, 13833, +-9250, 13800, +-9183, 13766, +-9183, 13733, +-9150, 13733, +-9116, 13733, +-9083, 13700, +-9050, 13700, +-8983, 13700, +-8950, 13700, +-8916, 13700, +-8850, 13700, +-8783, 13700, +-8716, 13700, +-8650, 13700, +-8583, 13733, +-8450, 13800, +-8383, 13833, +-8283, 13866, +-8216, 13966, +-8150, 14033, +-8083, 14133, +-8016, 14233, +-7950, 14400, +-7883, 14533, +-7816, 14700, +-7750, 14866, +-7683, 15033, +-7683, 15100, +-7616, 15233, +-7583, 15366, +-7583, 15466, +-7550, 15566, +-7550, 15633, +-7550, 15733, +-7550, 15833, +-7550, 15900, +-7583, 15933, +-7616, 16033, +-7650, 16100, +-7683, 16166, +-7716, 16233, +-7750, 16300, +-7783, 16366, +-7816, 16433, +-7850, 16466, +-7916, 16500, +-7950, 16566, +-8016, 16600, +-8050, 16666, +-8116, 16700, +-8183, 16733, +-8216, 16766, +-8283, 16800, +-8350, 16833, +-8383, 16866, +-8416, 16866, +-8450, 16900, +-8483, 16900, +-8516, 16900, +-8550, 16900, +-8550, 16866, +-8550, 16833, +-8550, 16800, +-8550, 16733, +-8550, 16666, +-8550, 16633, +-8550, 16533, +-8550, 16433, +-8550, 16333, +-8550, 16266, +-8516, 16100, +-8516, 16033, +-8483, 15833, +-8483, 15800, +-8450, 15666, +-8416, 15600, +-8383, 15500, +-8350, 15433, +-8350, 15366, +-8316, 15300, +-8283, 15233, +-8283, 15200, +-8283, 15166, +-8250, 15133, +-8216, 15100, +-8216, 15033, +-8183, 15000, +-8183, 14966, +-8150, 14933, +-8150, 14900, +-8150, 14833, +-8116, 14800, +-8116, 14766, +-8083, 14733, +-8083, 14666, +-8083, 14633, +-8050, 14566, +-8050, 14500, +-8016, 14466, +-8016, 14400, +-8016, 14333, +-7983, 14266, +-7983, 14233, +-7983, 14166, +-7950, 14100, +-7950, 14066, +-7950, 14000, +-7916, 13933, +-7883, 13866, +-7883, 13833, +-7850, 13766, +-7816, 13733, +-7816, 13666, +-7783, 13633, +-7750, 13600, +-7716, 13566, +-7683, 13566, +-7650, 13533, +-7616, 13533, +-7550, 13533, +-7483, 13533, +-7450, 13533, +-7383, 13533, +-7350, 13533, +-7316, 13533, +-7283, 13533, +-7216, 13600, +-7183, 13666, +-7116, 13800, +-7083, 13933, +-7050, 14066, +-6983, 14266, +-6950, 14433, +-6950, 14500, +-6916, 14633, +-6883, 14766, +-6883, 14900, +-6850, 15033, +-6850, 15133, +-6850, 15233, +-6816, 15300, +-6816, 15366, +-6816, 15466, +-6816, 15533, +-6783, 15600, +-6783, 15666, +-6783, 15733, +-6783, 15833, +-6750, 15866, +-6750, 15933, +-6750, 16033, +-6750, 16066, +-6750, 16133, +-6750, 16200, +-6750, 16266, +-6750, 16300, +-6750, 16366, +-6750, 16433, +-6783, 16466, +-6783, 16533, +-6816, 16600, +-6850, 16633, +-6850, 16700, +-6883, 16733, +-6916, 16766, +-6950, 16833, +-6983, 16866, +-7016, 16900, +-7050, 16900, +-7116, 16966, +-7183, 16966, +-7250, 17000, +-7316, 17033, +-7383, 17033, +-7416, 17066, +-7483, 17066, +-7550, 17100, +-7583, 17100, +-7616, 17100, +-7650, 17100, +-7683, 17100, +-7716, 17100, +-7716, 17066, +-7716, 17033, +-7716, 17000, +-7716, 16933, +-7716, 16866, +-7716, 16833, +-7716, 16766, +-7716, 16733, +-7716, 16700, +-7716, 16666, +-7683, 16600, +-7683, 16566, +-7650, 16500, +-7616, 16466, +-7550, 16400, +-7516, 16333, +-7483, 16266, +-7416, 16200, +-7383, 16100, +-7350, 16033, +-7316, 15966, +-7316, 15900, +-7283, 15833, +-7250, 15800, +-7250, 15733, +-7216, 15700, +-7183, 15633, +-7183, 15600, +-7150, 15533, +-7150, 15433, +-7116, 15400, +-7116, 15333, +-7083, 15266, +-7083, 15200, +-7050, 15133, +-7050, 15066, +-7016, 15000, +-7016, 14966, +-6983, 14833, +-6983, 14800, +-6950, 14666, +-6916, 14566, +-6916, 14466, +-6916, 14433, +-6883, 14400, +-6883, 14366, +-6883, 14300, +-6850, 14266, +-6850, 14200, +-6850, 14133, +-6816, 14066, +-6783, 13933, +-6783, 13866, +-6750, 13766, +-6683, 13633, +-6616, 13533, +-6583, 13466, +-6516, 13366, +-6483, 13333, +-6450, 13300, +-6416, 13266, +-6383, 13266, +-6383, 13233, +-6350, 13233, +-6316, 13233, +-6283, 13233, +-6250, 13233, +-6216, 13266, +-6150, 13300, +-6083, 13333, +-6050, 13366, +-5983, 13400, +-5950, 13400, +-5883, 13433, +-5816, 13500, +-5716, 13533, +-5650, 13600, +-5483, 13766, +-5450, 13800, +-5383, 13866, +-5316, 13933, +-5283, 13966, +-5250, 14033, +-5216, 14066, +-5216, 14100, +-5183, 14100, +-5183, 14133, +-5183, 14200, +-5183, 14266, +-5183, 14333, +-5183, 14366, +-5183, 14466, +-5183, 14533, +-5183, 14600, +-5183, 14666, +-5183, 14733, +-5216, 14800, +-5250, 14866, +-5250, 14900, +-5283, 14966, +-5316, 15033, +-5350, 15066, +-5383, 15133, +-5416, 15200, +-5416, 15233, +-5450, 15266, +-5483, 15300, +-5483, 15333, +-5516, 15333, +-5516, 15366, +-5550, 15400, +-5583, 15400, +-5616, 15433, +-5650, 15466, +-5683, 15466, +-5716, 15500, +-5750, 15500, +-5783, 15500, +-5816, 15500, +-5850, 15500, +-5883, 15500, +-5916, 15500, +-5950, 15500, +-5983, 15500, +-6016, 15500, +-6050, 15500, +-6050, 15466, +-6083, 15466, +-6083, 15433, +-6116, 15400, +-6116, 15366, +-6116, 15333, +-6116, 15300, +-6150, 15266, +-6150, 15233, +-6150, 15200, +-6183, 15166, +-6183, 15133, +-6183, 15033, +-6216, 15000, +-6216, 14933, +-6250, 14833, +-6250, 14800, +-6283, 14700, +-6316, 14633, +-6316, 14566, +-6350, 14533, +-6350, 14466, +-6383, 14433, +-6383, 14400, +-6416, 14366, +-6416, 14333, +-6450, 14300, +-6450, 14266, +-6483, 14233, +-6516, 14200, +-6516, 14133, +-6550, 14100, +-6550, 14066, +-6583, 14033, +-6583, 14000, +-6583, 13966, +-6616, 13933, +-6616, 13900, +-6616, 13866, +-6616, 13833, +-6616, 13800, +-6616, 13766, +-6583, 13733, +-6550, 13700, +-6516, 13666, +-6483, 13633, +-6450, 13633, +-6450, 13600, +-6416, 13566, +-6383, 13566, +-6350, 13533, +-6316, 13500, +-6283, 13500, +-6250, 13466, +-6216, 13433, +-6183, 13433, +-6150, 13400, +-6116, 13400, +-6083, 13400, +-6050, 13400, +-6016, 13400, +-5983, 13400, +-5950, 13400, +-5916, 13400, +-5883, 13400, +-5850, 13400, +-5816, 13433, +-5783, 13466, +-5750, 13466, +-5716, 13500, +-5683, 13533, +-5683, 13566, +-5650, 13566, +-5616, 13600, +-5583, 13600, +-5550, 13633, +-5516, 13633, +-5516, 13666, +-5483, 13666, +-5483, 13700, +-5450, 13700, +-5450, 13733, +-5416, 13733, +-5416, 13766, +-5383, 13766, +-5383, 13800, +-5350, 13833, +-5350, 13866, +-5316, 13866, +-5316, 13900, +-5316, 13933, +-5283, 13933, +-5283, 13966, +-5283, 14000, +-5250, 14000, +-5250, 14033, +-5216, 14066, +-5216, 14100, +-5183, 14100, +-5183, 14133, +-5150, 14166, +-5150, 14200, +-5116, 14200, +-5116, 14233, +-5083, 14266, +-5083, 14300, +-5050, 14300, +-5050, 14333, +-5050, 14366, +-5016, 14400, +-5016, 14433, +-5016, 14466, +-5016, 14500, +-5016, 14533, +-5050, 14566, +-5083, 14600, +-5083, 14633, +-5116, 14666, +-5150, 14700, +-5150, 14733, +-5183, 14766, +-5216, 14800, +-5216, 14833, +-5250, 14866, +-5250, 14900, +-5250, 14933, +-5283, 14933, +-5283, 14966, +-5316, 14966, +-5316, 15000, +-5316, 15033, +-5350, 15066, +-5350, 15100, +-5350, 15133, +-5383, 15133, +-5383, 15166, +-5416, 15166, +-5416, 15200, +-5416, 15233, +-5450, 15233, +-5450, 15266, +-5483, 15266, +-5516, 15300, +-5550, 15300, +-5583, 15333, +-5616, 15333, +-5650, 15366, +-5683, 15366, +-5683, 15400, +-5716, 15400, +-5750, 15400, +-5783, 15400, +-5816, 15400, +-5850, 15400, +-5883, 15400, +-5916, 15400, +-5950, 15400, +-5983, 15400, +-6016, 15400, +-6050, 15400, +-6083, 15400, +-6083, 15366, +-6116, 15366, +-6116, 15333, +-6116, 15300, +-6150, 15300, +-6150, 15266, +-6183, 15266, +-6183, 15233, +-6183, 15200, +-6216, 15200, +-6216, 15166, +-6216, 15133, +-6250, 15133, +-6250, 15100, +-6250, 15066, +-6283, 15033, +-6283, 15000, +-6283, 14966, +-6283, 14933, +-6283, 14900, +-6283, 14866, +-6283, 14833, +-6283, 14800, +-6250, 14800, +-6250, 14766, +-6216, 14766, +-6216, 14733, +-6183, 14733, +-6150, 14700, +-6116, 14700, +-6083, 14700, +-6050, 14700, +-6016, 14700, +-5983, 14700, +-5950, 14700, +-5916, 14700, +-5883, 14700, +-5850, 14700, +-5850, 14666, +-5816, 14666, +-5783, 14666, +-5750, 14666, +-5716, 14666, +-5683, 14666, +-5650, 14666, +-5616, 14666, +-5583, 14666, +-5550, 14666, +-5516, 14700, +-5483, 14700, +-5450, 14700, +-5383, 14733, +-5350, 14733, +-5350, 14766, +-5316, 14766, +-5283, 14800, +-5250, 14800, +-5216, 14833, +-5183, 14833, +-5150, 14866, +-5083, 14900, +-5050, 14933, +-5016, 14966, +-4983, 15000, +-4950, 15033, +-4916, 15033, +-4883, 15066, +-4883, 15100, +-4850, 15100, +-4850, 15133, +-4816, 15133, +-4816, 15166, +-4816, 15200, +-4783, 15200, +-4783, 15233, +-4783, 15266, +-4750, 15266, +-4750, 15300, +-4716, 15300, +-4716, 15333, +-4683, 15333, +-4683, 15366, +-4683, 15400, +-4650, 15433, +-4650, 15466, +-4616, 15466, +-4616, 15466 }; - - -/* -double liste[] = { --123.5, 141, --122.833, 141, --122.5, 141.333, --122.167, 141.667, --121.5, 142, --121.167, 142.333, --120.5, 143, --119.5, 143.667, --119.167, 144.333, --118.5, 145.333, --117.833, 146.333, --116.833, 147.333, --116.5, 148.667, --116.167, 149.333, --115.167, 151, --114.833, 151.667, --114.5, 152.667, --113.833, 153.667, --113.5, 154.667, --113.167, 155.667, --112.833, 156.333, --112.5, 157.667, --112.5, 158.667, --112.167, 159.667, --112.167, 161, --111.833, 161.667, --111.833, 162.667, --111.833, 163.333, --111.5, 164.333, --111.5, 165.333, --111.5, 166, --111.5, 168, --111.5, 168.333, --111.5, 169, --111.5, 169.333, --111.5, 169.667, --111.833, 170, --112.167, 170.333, --112.5, 171, --113.167, 171.333, --113.5, 171.333, --114.167, 171.667, --114.5, 172, --114.833, 172, --115.5, 172.333, --115.833, 172.333, --116.167, 172.333, --116.833, 172.667, --117.167, 172.667, --117.5, 172.667, --117.833, 172.667, --118.167, 172.667, --118.5, 172.667, --118.833, 172.333, --119.5, 172, --119.833, 171.667, --120.5, 171.333, --120.833, 171, --121.167, 170.333, --121.5, 170, --121.833, 169.667, --122.167, 169.333, --122.167, 169, --122.5, 168.333, --122.5, 168, --122.5, 167.667, --122.5, 166.667, --122.5, 165.667, --122.5, 165, --122.167, 164, --121.833, 163, --121.5, 162.333, --120.833, 160.667, --120.833, 160, --120.5, 159.333, --120.167, 158.333, --119.833, 157.667, --119.5, 156.667, --119.167, 156, --119.167, 155.333, --118.833, 154.333, --118.5, 153.667, --118.5, 152.667, --118.5, 151.667, --118.167, 150.667, --118.167, 150, --118.167, 149.333, --118.167, 148.333, --118.167, 147.333, --118.167, 146.667, --118.167, 145.667, --118.167, 145, --118.167, 144, --118.167, 143.333, --118.167, 142.667, --118.167, 141.333, --118.167, 141, --118.167, 140.333, --118.167, 139.333, --118.167, 138.667, --118.167, 138, --118.167, 137.333, --118.167, 136.333, --118.167, 135.667, --118.167, 135, --118.167, 134.333, --118.167, 133.667, --118.167, 133, --118.167, 132.667, --118.167, 132, --118.167, 131.333, --118.167, 131, --118.167, 130.667, --118.167, 130.333, --118.167, 130, --118.167, 129.667, --118.167, 129.333, --118.167, 128.667, --118.167, 128.333, --117.833, 128, --117.833, 127.333, --117.833, 126.667, --117.833, 126.333, --117.833, 126, --117.833, 125.667, --117.833, 125.333, --117.833, 125, --117.833, 125.333, --117.833, 125.667, --117.833, 126, --117.833, 126.333, --117.833, 127, --117.833, 127.333, --117.833, 127.667, --117.833, 128.333, --117.833, 129.333, --117.833, 130, --117.833, 130.333, --117.833, 131.333, --117.833, 131.667, --117.833, 133, --117.833, 134, --117.833, 134.667, --117.833, 135, --117.833, 135.333, --117.833, 136.333, --117.833, 137, --117.5, 137.667, --117.5, 138, --117.167, 138.667, --116.833, 139.333, --116.5, 140, --115.833, 140.667, --115.5, 141, --115.167, 141.667, --114.5, 142.333, --114.167, 142.667, --113.5, 143.333, --113.167, 143.667, --112.5, 144, --112.167, 144.333, --111.833, 144.333, --111.5, 144.667, --111.167, 144.667, --110.5, 145, --110.167, 145, --109.833, 145, --109.5, 145, --109.167, 145, --108.833, 145, --108.5, 145, --108.167, 144.667, --108.167, 144.333, --107.833, 144.333, --107.5, 143.667, --107.5, 143.333, --107.167, 143, --107.167, 142.667, --107.167, 142.333, --107.167, 142, --106.833, 142, --106.833, 141.667, --106.833, 141.333, --106.833, 141, --106.833, 140.667, --106.5, 140, --106.5, 139.333, --106.5, 139, --106.5, 138.667, --106.5, 138, --106.5, 137.333, --106.5, 137, --106.5, 136.333, --106.5, 136, --106.5, 135.667, --106.5, 135.333, --106.5, 135, --106.5, 134.333, --106.167, 133.667, --106.167, 133.333, --106.167, 133, --106.167, 132.667, --106.167, 132.333, --105.833, 132, --105.833, 131.667, --105.833, 131.333, --105.833, 130.333, --105.833, 130, --105.833, 129.667, --105.833, 129.333, --105.5, 129.333, --105.5, 129, --105.5, 128.667, --105.5, 128.333, --105.5, 128, --105.5, 127.667, --105.5, 127.333, --105.5, 127, --105.5, 126.667, --105.5, 126.333, --105.5, 126, --105.5, 125.667, --105.5, 125.333, --105.5, 125, --105.5, 125.333, --105.167, 125.667, --105.167, 126, --104.833, 126, --104.833, 126.333, --104.833, 126.667, --104.5, 127, --104.5, 127.333, --104.167, 127.333, --104.167, 127.667, --103.833, 127.667, --103.5, 127.667, --103.167, 128, --102.833, 128, --102.833, 128.333, --102.5, 128.667, --102.167, 128.667, --101.5, 129.333, --101.5, 129.667, --100.833, 130.333, --100.833, 130.667, --100.5, 131, --100.5, 131.333, --100.167, 131.667, --100.167, 132, --99.8333, 132.667, --99.8333, 133, --99.5, 133.333, --99.5, 133.667, --99.5, 134, --99.1667, 134.333, --98.8333, 134.667, --98.8333, 135, --98.5, 135.333, --98.1667, 135.667, --98.1667, 136, --97.8333, 136, --97.5, 136, --97.1667, 136, --96.8333, 136, --96.5, 136, --96.1667, 136, --95.8333, 136, --95.5, 136, --95.1667, 136, --94.8333, 136, --94.5, 136, --94.1667, 135.667, --93.8333, 135.667, --93.5, 135.667, --93.1667, 135.667, --92.8333, 135.667, --92.5, 135.667, --92.1667, 135.667, --91.8333, 135.667, --91.5, 135.667, --90.8333, 135.667, --90.5, 135.667, --90.1667, 135.667, --89.5, 135.667, --89.1667, 136, --88.8333, 136, --88.5, 136.333, --87.8333, 136.333, --87.5, 136.667, --87.1667, 136.667, --86.5, 136.667, --86.1667, 137, --85.8333, 137, --85.5, 137.333, --84.8333, 137.333, --84.5, 137.333, --84.1667, 137.667, --83.8333, 137.667, --83.5, 137.667, --83.5, 138, --83.1667, 138, --82.8333, 138.333, --82.5, 138.667, --82.1667, 139, --81.8333, 139.333, --81.5, 139.667, --81.5, 140, --81.1667, 140, --81.1667, 140.333, --81.1667, 140.667, --81.1667, 141, --81.1667, 141.333, --81.1667, 141.667, --81.1667, 142, --81.5, 142.333, --81.5, 142.667, --81.8333, 143, --82.1667, 143.333, --82.5, 143.667, --82.8333, 143.667, --83.1667, 144, --84.5, 144.667, --85.1667, 144.667, --85.5, 144.667, --86.1667, 145, --86.5, 145, --86.8333, 145, --87.5, 145.333, --87.8333, 145.333, --88.1667, 145.333, --88.5, 145.333, --89.1667, 145.333, --89.8333, 145.333, --90.1667, 145.333, --90.8333, 145.333, --91.1667, 145.333, --91.5, 145, --91.8333, 145, --92.5, 145, --92.8333, 144.667, --93.1667, 144.333, --93.5, 144.333, --93.8333, 144, --94.1667, 144, --94.5, 144, --94.8333, 143.667, --95.1667, 143.667, --95.5, 143.333, --95.5, 143, --95.8333, 143, --96.1667, 142.667, --96.1667, 142.333, --96.1667, 142, --96.1667, 141.667, --96.5, 141.333, --96.5, 140.667, --96.5, 140.333, --96.5, 140, --96.5, 139.667, --96.5, 139.333, --96.5, 139, --96.5, 138.667, --96.5, 138.333, --96.5, 138, --96.8333, 137.667, --96.8333, 137.333, --96.8333, 137, --96.8333, 136.333, --96.8333, 136, --96.8333, 135.333, --96.8333, 135, --96.8333, 134.667, --96.8333, 134.333, --96.8333, 134, --96.8333, 133.667, --96.8333, 133.333, --96.8333, 133, --96.8333, 132.667, --96.8333, 132.333, --96.8333, 132, --96.8333, 131.667, --96.8333, 131.333, --96.8333, 131, --96.8333, 130.667, --96.5, 130.333, --96.5, 130, --96.1667, 129.667, --96.1667, 129.333, --95.8333, 129, --95.5, 128.667, --95.5, 128.333, --95.1667, 128.333, --95.1667, 128, --94.8333, 127.667, --94.5, 127.333, --94.1667, 127, --94.1667, 126.667, --93.8333, 126.333, --93.5, 126.333, --93.5, 126, --93.1667, 126, --93.1667, 125.667, --92.8333, 125.667, --92.5, 125.333, --92.1667, 125, --91.8333, 125, --91.5, 125, --91.1667, 124.667, --90.8333, 124.667, --90.5, 124.667, --90.1667, 124.333, --89.5, 124.333, --89.1667, 124.333, --88.8333, 124.333, --88.5, 124.333, --88.1667, 124, --87.8333, 124, --87.5, 124, --87.1667, 124, --86.8333, 124, --86.5, 124, --86.1667, 124, --85.8333, 124, --85.5, 124, --84.8333, 124, --84.5, 124, --84.1667, 124, --83.8333, 124, --83.1667, 124.333, --82.8333, 124.667, --82.5, 124.667, --82.1667, 125, --81.8333, 125, --81.5, 125.333, --81.1667, 125.333, --81.1667, 125.667, --80.8333, 125.667, --80.5, 126, --80.1667, 126.333, --80.1667, 126.667, --79.8333, 126.667, --79.8333, 127, --79.5, 127, --79.1667, 127, --79.1667, 127.333, --78.8333, 127.333, --78.5, 127.333, --78.5, 127.667, --77.8333, 128, --77.5, 128, --77.1667, 128, --77.1667, 128.333, --76.8333, 128.667, --76.5, 129, --76.5, 129.333, --76.1667, 129.667, --75.8333, 130, --75.8333, 130.333, --75.5, 130.667, --75.5, 131, --75.1667, 131, --75.1667, 131.333, --75.1667, 131.667, --75.1667, 132, --75.1667, 132.333, --75.1667, 132.667, --74.8333, 133, --74.8333, 133.333, --74.8333, 133.667, --74.5, 134.333, --74.5, 134.667, --74.5, 135, --74.1667, 135.333, --74.1667, 135.667, --73.8333, 135.667, --73.5, 135.667, --73.1667, 135.667, --72.8333, 135.667, --72.5, 135.667, --72.1667, 135.667, --71.8333, 135.667, --71.5, 135.667, --71.1667, 135.667, --70.8333, 135.333, --70.5, 135.333, --70.1667, 135.333, --69.8333, 135.333, --69.5, 135, --68.8333, 135, --68.5, 135, --68.1667, 135, --67.5, 135, --67.1667, 135, --66.8333, 135, --66.5, 135, --66.1667, 135, --65.8333, 135, --65.5, 135, --65.1667, 135, --64.8333, 135, --64.5, 135, --64.1667, 135, --63.8333, 135, --63.5, 135, --63.1667, 135, --63.5, 134.667, --63.5, 134.333, --63.8333, 134.333, --63.8333, 134, --63.8333, 133.667, --63.8333, 133.333, --63.8333, 133, --63.8333, 132.667, --63.8333, 132.333, --63.8333, 132, --63.8333, 131.667, --63.8333, 131.333, --63.8333, 131, --63.8333, 130.667, --63.8333, 130.333, --63.8333, 130, --63.5, 130, --63.5, 129.667, --63.5, 129.333, --63.5, 129, --63.1667, 129, --63.1667, 128.667, --63.1667, 128.333, --62.8333, 128.333, --62.8333, 128, --62.5, 128, --62.5, 127.667, --62.1667, 127.333, --61.8333, 127, --61.8333, 126.667, --61.5, 126.667, --61.1667, 126.333, --60.8333, 126.333, --60.8333, 126, --60.5, 126, --60.5, 125.667, --60.1667, 125.667, --60.1667, 125.333, --59.8333, 125.333, --59.5, 125.333, --59.5, 125, --59.1667, 125, --58.8333, 125, --58.5, 125, --58.1667, 124.667, --57.8333, 124.667, --57.5, 124.667, --57.1667, 124.667, --57.1667, 124.333, --56.8333, 124.333, --56.5, 124.333, --56.1667, 124.333, --55.8333, 124.333, --55.5, 124.333, --55.1667, 124.333, --54.8333, 124.333, --54.5, 124.333, --54.1667, 124.333, --53.8333, 124.333, --53.5, 124.333, --53.1667, 124.333, --52.8333, 124.333, --52.5, 124.333, --52.1667, 124.333, --51.8333, 124.333, --51.5, 124.333, --51.1667, 124.333, --51.1667, 124.667, --50.8333, 124.667, --50.5, 125, --50.1667, 125, --50.1667, 125.333, --49.8333, 125.667, --49.8333, 126, --49.5, 126, --49.5, 126.333, --49.5, 126.667, --49.5, 127, --49.5, 127.333, --49.5, 127.667, --49.1667, 128, --49.1667, 128.333, --49.1667, 128.667, --49.1667, 129, --49.1667, 129.333, --49.1667, 129.667, --49.1667, 130, --48.8333, 130.333, --48.8333, 130.667, --48.8333, 131, --48.8333, 131.333, --48.8333, 131.667, --48.8333, 132, --48.8333, 132.667, --48.8333, 133, --48.8333, 133.333, --48.5, 133.667, --48.5, 134, --48.5, 134.333, --48.5, 134.667, --48.5, 135, --48.5, 135.333, --48.5, 135.667, --48.5, 136, --48.5, 136.333, --48.5, 136.667, --48.5, 137, --48.5, 137.333, --48.5, 137.667, --48.5, 138, --48.5, 138.333, --48.5, 138.667, --48.5, 139, --48.5, 139.333, --48.5, 139.667, --48.5, 140, --48.5, 140.333, --48.5, 140.667, --48.8333, 140.667, --48.8333, 141, --49.1667, 141.333, --49.5, 141.667, --49.8333, 141.667, --49.8333, 142, --50.1667, 142, --50.5, 142, --50.5, 142.333, --50.8333, 142.333, --51.1667, 142.333, --51.5, 142.333, --51.8333, 142.333, --52.1667, 142.333, --52.5, 142.333, --52.8333, 142.333, --53.1667, 142.333, --53.5, 142.333, --53.8333, 142.333, --54.1667, 142.667, --54.5, 142.667, --54.8333, 142.667, --55.1667, 142.667, --55.5, 142.667, --55.8333, 142.667, --56.1667, 142.667, --56.5, 142.667, --56.8333, 142.667, --57.1667, 142.667, --57.5, 142.667, --57.8333, 142.667, --57.8333, 142.333, --58.1667, 142.333, --58.5, 142.333, --58.8333, 142.333, --58.8333, 142, --59.1667, 142, --59.1667, 141.667, --59.5, 141.667, --59.8333, 141.333, --60.1667, 141, --60.5, 140.667, --60.8333, 140.667, --60.8333, 140.333, --61.1667, 140, --61.1667, 139.667, --61.5, 139.333, --61.5, 139, --61.5, 138.667, --61.8333, 138.667, --62.1667, 138.333, --62.1667, 138, --62.5, 138, --62.5, 137.667, --62.8333, 137.667, --62.8333, 137.333, --62.8333, 137, --62.8333, 136.667, --62.8333, 136.333, --62.8333, 136, --63.1667, 136, --63.1667, 135.667, --63.1667, 135.333, --63.1667, 135.667, --63.1667, 136, --63.1667, 136.333, --63.1667, 136.667, --63.1667, 137, --63.1667, 137.333, --63.1667, 137.667, --63.1667, 138, --63.1667, 138.333, --62.8333, 138.667, --62.8333, 139, --62.8333, 139.333, --62.5, 139.333, --62.5, 139.667, --62.1667, 140, --62.1667, 140.333, --61.8333, 140.667, --61.8333, 141, --61.5, 141, --61.5, 141.333, --61.1667, 141.333, --61.1667, 141.667, --60.8333, 141.667, --60.8333, 142, --60.5, 142, --60.1667, 142, --60.1667, 142.333, --59.8333, 142.333, --59.5, 142.333, --59.1667, 142.333, --59.1667, 142.667, --58.8333, 142.667, --58.5, 142.667, --58.1667, 142.667, --58.1667, 143, --57.8333, 143, --57.5, 143, --57.1667, 143.333, --56.8333, 143.333, --56.5, 143.333, --56.1667, 143.333, --55.8333, 143.333, --55.5, 143.333, --55.1667, 143.333, --54.8333, 143.333, --54.5, 143.333, --54.1667, 143.333, --53.8333, 143.333, --53.5, 143.333, --53.1667, 143.333, --52.8333, 143.333, --52.5, 143.333, --52.1667, 143.333, --51.8333, 143.333, --51.5, 143.333, --51.1667, 143.333, --51.1667, 143.667, --50.8333, 143.667, --50.5, 143.667, --50.1667, 143.667, --50.1667, 144, --49.8333, 144, --49.8333, 143.667, --49.5, 143.667, --49.5, 143.333, --49.1667, 143.333, --49.1667, 143, --49.1667, 142.667, --49.1667, 142.333, --49.1667, 142, --48.8333, 141.667, --48.8333, 141.333, --48.8333, 141, --48.8333, 140.667, --48.8333, 140.333, --48.8333, 140, --48.8333, 139.667, --48.8333, 139.333, --48.8333, 139, --48.8333, 138.667, --48.8333, 138.333, --48.8333, 138, --48.8333, 137.667, --48.8333, 137.333, --48.8333, 137, --48.8333, 136.667, --48.8333, 136.333, --48.8333, 136, --49.1667, 135.667, --49.1667, 135.333, --49.1667, 135, --49.1667, 134.667, --49.1667, 134.333, --49.1667, 133.667, --49.1667, 133.333, --49.1667, 133, --49.1667, 132.667, --48.8333, 132.333, --48.8333, 132, --48.8333, 131.667, --48.8333, 131.333, --48.5, 131.333, --48.5, 131, --48.5, 130.667, --48.1667, 130.667, --48.1667, 130.333, --48.1667, 130, --48.1667, 129.667, --47.8333, 129.667, --47.8333, 129.333, --47.8333, 129, --47.8333, 128.667, --47.5, 128.667, --47.5, 128.333, --47.5, 128, --47.5, 127.667, --47.1667, 127.667, --47.1667, 127, --46.8333, 127, --46.8333, 126.667, --46.5, 126.667, --46.1667, 126.333, --45.8333, 126.333, --45.5, 126.333, --45.1667, 126.333, --44.8333, 126.333, --44.5, 126.333, --44.1667, 126.333, --43.8333, 126.333, --43.5, 126.667, --43.5, 127, --43.1667, 127.667, --42.8333, 128, --42.5, 128.333, --42.5, 128.667, --42.1667, 129, --42.1667, 129.333, --41.8333, 130, --41.5, 130.333, --41.1667, 130.667, --41.1667, 131.333, --40.8333, 131.667, --40.8333, 132, --40.8333, 132.333, --40.5, 132.667, --40.5, 133, --40.5, 133.333, --40.1667, 133.667, --40.1667, 134, --40.1667, 134.333, --40.1667, 134.667, --40.1667, 135, --40.1667, 135.333, --39.8333, 135.667, --39.8333, 136, --39.8333, 136.333, --39.8333, 136.667, --39.8333, 137, --39.8333, 137.333, --39.8333, 137.667, --39.8333, 138, --39.8333, 138.333, --39.8333, 138.667, --39.8333, 139, --39.8333, 139.333, --39.8333, 139.667, --39.8333, 140, --39.8333, 140.333, --39.5, 140.333, --39.5, 140.667, --39.5, 141, --39.5, 141.333, --39.5, 141.667, --39.5, 142, --39.5, 142.333, --39.5, 142.667, --39.5, 143, --39.1667, 143.333, --39.1667, 143.667, --39.1667, 144, --39.1667, 144.333, --39.1667, 144.667, --39.1667, 145, --39.1667, 145.333, --39.5, 145.333, --39.5, 145.667, --39.8333, 145.667, --40.1667, 145.667, --40.5, 146, --40.8333, 146, --41.1667, 146, --41.5, 146, --41.8333, 146, --42.1667, 146, --42.5, 146, --42.5, 145.667, --42.5, 145.333, --42.5, 145, --42.5, 144.667, --42.5, 144.333, --42.5, 144, --42.5, 143.667, --42.5, 143.333, --42.5, 143, --42.5, 142.667, --42.5, 142.333, --42.1667, 142, --41.8333, 141.667, --41.5, 141.667, --41.1667, 141.667, --40.8333, 141.333, --40.5, 141.333, --40.1667, 141.333, --39.8333, 141.333, --39.5, 141.333, --39.1667, 141.333, --38.8333, 141.333, --38.5, 141.333, --38.1667, 141.333, --37.5, 141.333, --37.1667, 141.333, --36.8333, 141.333, --36.8333, 141.667, --36.5, 141.667, --36.1667, 141.667, --35.8333, 141.667, --35.5, 141.667, --35.1667, 141.667, --34.8333, 141.667, --34.5, 141.667, --34.1667, 141.667, --33.8333, 141.667, --33.5, 141.667, --33.1667, 141.667, --32.8333, 141.667, --32.5, 141.667, --32.5, 142, --32.1667, 142, --31.8333, 142, --31.5, 142, --31.1667, 142, --30.8333, 142, --30.5, 142, --30.1667, 142, --30.1667, 141.667, --30.1667, 141.333, --30.1667, 141, --30.1667, 140.667, --30.1667, 140.333, --29.8333, 140.333, --29.8333, 140, --29.8333, 139.667, --29.5, 139.333, --29.5, 139, --29.1667, 138.667, --29.1667, 138.333, --29.1667, 138, --29.1667, 137.667, --29.1667, 137.333, --29.1667, 137, --29.1667, 136.667, --29.1667, 136.333, --29.1667, 136, --29.1667, 135.667, --29.1667, 135.333, --29.1667, 135, --29.1667, 134.667, --29.1667, 134.333, --29.1667, 134, --29.5, 133.667, --29.5, 133.333, --29.5, 133, --29.8333, 133, --29.8333, 132.667, --29.8333, 132.333, --30.1667, 132.333, --30.1667, 132, --30.1667, 131.667, --30.1667, 131.333, --30.5, 131.333, --30.5, 131, --30.5, 130.667, --30.5, 130.333, --30.5, 130, --30.5, 129.667, --30.8333, 129.333, --30.8333, 129, --30.5, 129, --30.1667, 129, --30.1667, 128.667, --29.8333, 128.333, --29.8333, 128, --29.5, 128, --29.5, 127.667, --29.5, 127.333, --29.5, 127, --29.5, 126.667, --29.5, 126.333, --29.5, 126, --29.1667, 126, --29.1667, 125.667, --28.8333, 125.667, --28.8333, 125.333, --28.5, 125.333, --28.1667, 125.333, --28.1667, 125, --27.8333, 125, --27.5, 125, --26.8333, 125, --26.5, 125, --26.1667, 125, --25.8333, 125, --25.5, 125, --25.1667, 125, --24.8333, 125, --24.5, 125, --24.1667, 125.333, --23.8333, 125.333, --23.8333, 125.667, --23.5, 126, --23.5, 126.333, --23.1667, 126.667, --22.8333, 127, --22.5, 127.333, --22.1667, 127.667, --21.8333, 127.667, --21.5, 128, --21.1667, 128, --21.1667, 128.333, --20.8333, 128.333, --21.1667, 128.333, --20.8333, 128.333, --20.5, 128.333, --20.1667, 128.333, --19.8333, 128.667, --19.5, 128.667, --19.1667, 129, --19.1667, 129.333, --19.5, 129.333, --19.8333, 129.333, --20.1667, 129.333, --20.1667, 129.667, --20.5, 129.667, --20.5, 130, --20.8333, 130, --20.8333, 130.333, --21.1667, 130.667, --21.1667, 131, --21.1667, 131.333, --21.1667, 131.667, --21.1667, 132, --21.5, 132, --21.5, 132.333, --21.5, 132.667, --21.5, 133, --21.5, 133.333, --21.8333, 133.333, --21.8333, 133.667, --21.8333, 134, --22.1667, 134, --22.1667, 134.333, --22.1667, 134.667, --22.1667, 135, --22.1667, 135.333, --22.1667, 135.667, --22.1667, 136, --22.1667, 136.333, --22.1667, 136.667, --22.1667, 137, --22.1667, 137.333, --22.1667, 137.667, --22.1667, 138, --22.1667, 138.333, --22.1667, 138.667, --22.1667, 139, --21.8333, 139.333, --21.8333, 139.667, --21.5, 140, --21.5, 140.333, --21.5, 140.667, --21.1667, 140.667, --21.1667, 141, --20.8333, 141, --20.8333, 141.333, --20.5, 141.333, --20.5, 141.667, --20.1667, 141.667, --20.1667, 142, --19.8333, 142.333, --19.5, 142.333, --19.5, 142.667, --19.1667, 142.667, --18.8333, 143, --18.5, 143, --18.1667, 143, --17.8333, 143, --17.8333, 143.333, --17.5, 143.333, --17.1667, 143.333, --16.8333, 143.667, --16.5, 143.667, --16.1667, 144, --15.8333, 144, --15.5, 144.333, --15.1667, 144.333, --14.8333, 144.333, --14.8333, 144.667, --14.5, 144.667, --14.5, 145, --14.1667, 145, --13.8333, 145, --13.5, 145, --13.1667, 145, --12.8333, 145, --12.5, 145, --12.1667, 145, --11.8333, 145, --11.5, 144.667, --11.1667, 144.333, --10.8333, 144.333, --10.5, 144, --10.1667, 143.667, --9.83333, 143.333, --9.5, 143, --9.5, 142.667, --9.16667, 142.667, --9.16667, 142.333, --9.16667, 142, --8.83333, 142, --8.5, 142, --8.5, 141.667, --8.5, 142, --8.5, 142.333, --8.83333, 142.333, --8.83333, 142.667, --9.16667, 142.667, --9.16667, 143, --9.5, 143, --9.5, 143.333, --9.83333, 143.333, --9.83333, 143.667, --10.1667, 143.667, --10.5, 144, --10.8333, 144.333, --11.1667, 144.333, --11.5, 144.667, --11.8333, 144.667, --12.1667, 144.667, --12.5, 144.667, --12.8333, 144.667, --13.1667, 144.667, --13.5, 144.667, --13.8333, 144.667, --14.1667, 144.667, --14.5, 144.667, --14.8333, 144.667, --15.1667, 144.667, --15.5, 144.667, --15.8333, 144.667, --16.1667, 144.333, --16.5, 144.333, --16.8333, 144.333, --17.1667, 144, --17.5, 144, --17.8333, 143.667, --18.1667, 143.667, --18.1667, 143.333, --18.5, 143.333, --18.8333, 143, --19.1667, 143, --19.1667, 142.667, --19.5, 142.333, --19.5, 142, --19.8333, 141.667, --19.8333, 141.333, --20.1667, 141.333, --20.1667, 141, --20.5, 141, --20.5, 140.667, --20.8333, 140.333, --20.8333, 140, --21.1667, 140, --21.1667, 139.667, --21.5, 139.333, --21.5, 139, --21.8333, 139, --21.8333, 138.667, --22.1667, 138.667, --22.1667, 138.333, --22.5, 138.333, --22.5, 138, --22.8333, 138, --22.8333, 137.667, --22.8333, 137.333, --22.8333, 137, --22.8333, 136.667, --22.8333, 136.333, --22.8333, 136, --22.8333, 135.667, --22.8333, 135.333, --22.8333, 135, --22.8333, 134.667, --22.8333, 134.333, --22.8333, 134, --22.8333, 133.667, --22.5, 133.333, --22.5, 133, --22.5, 132.667, --22.5, 132.333, --22.5, 132, --22.1667, 132, --22.1667, 131.667, --22.1667, 131.333, --21.8333, 131.333, --21.8333, 131, --21.5, 131, --21.5, 130.667, --21.5, 130.333, --21.1667, 130.333, --21.1667, 130, --21.1667, 129.667, --20.8333, 129.667, --20.8333, 129.333, --20.5, 129.333, --20.5, 129, --20.1667, 129, --20.1667, 128.667, --20.1667, 128.333, --19.8333, 128.333, --19.8333, 128, --19.5, 128, --19.5, 127.667, --19.1667, 127.667, --19.1667, 127.333, --18.8333, 127.333, --18.5, 127, --18.1667, 127, --17.8333, 126.667, --17.5, 126.667, --17.5, 126.333, --17.1667, 126.333, --16.8333, 126.333, --16.5, 126.333, --16.5, 126, --16.1667, 126, --15.8333, 126, --15.5, 126, --15.1667, 126, --14.8333, 126, --14.5, 126, --14.1667, 126, --13.8333, 126, --13.5, 126, --13.5, 126.333, --13.1667, 126.333, --12.8333, 126.333, --12.5, 126.333, --12.1667, 126.333, --11.8333, 126.667, --11.5, 126.667, --11.1667, 126.667, --10.8333, 126.667, --10.5, 126.667, --10.1667, 127, --9.83333, 127, --9.5, 127.333, --9.5, 127.667, --9.16667, 127.667, --8.83333, 128, --8.83333, 128.333, --8.5, 128.333, --8.5, 128.667, --8.16667, 129, --8.16667, 129.333, --7.83333, 129.667, --7.5, 129.667, --7.5, 130, --7.16667, 130.333, --6.83333, 130.333, --6.83333, 130.667, --6.5, 131, --6.16667, 131, --6.16667, 131.333, --6.16667, 131, --6.5, 131, --6.83333, 131, --6.83333, 131, -}; -*/ + diff --git a/src/programme/programme.ino b/src/programme/programme.ino index db2ecb0..1b5ba75 100644 --- a/src/programme/programme.ino +++ b/src/programme/programme.ino @@ -14,15 +14,16 @@ void setup() { void loop() { Serial.println("Loop"); lectureCorrectif(); + dessineListe(); - spirale(-100, 170, 25); - cercle(-30, 170, 25); - fleur(40, 170, 25); - coeur(-100, 100, 25); - etoile(-30, 100, 25); - maison(-100, 35, 50); +// spirale(-100, 170, 25); +// cercle(-30, 170, 25); +// fleur(40, 170, 25); +// coeur(-100, 100, 25); +// etoile(-30, 100, 25); +// maison(-100, 35, 50); -// double delta=0.0; +// float delta=0.0; // rectangle(MIN_X+delta, MIN_Y+delta, MAX_X-delta, MAX_Y-delta); // cercle(50, 120, 20); @@ -31,6 +32,7 @@ void loop() { // coeur(0,100,50); Serial.println("End \n"); + Serial.flush(); exit(0); } diff --git a/src/simulateur/dessins.pde b/src/simulateur/dessins.pde index 3effc6f..19ccdd4 100644 --- a/src/simulateur/dessins.pde +++ b/src/simulateur/dessins.pde @@ -1,3 +1,4 @@ +// Jusqu'à la ligne 130, le code est identique à programme/dessins.h // https://en.wikipedia.org/wiki/Hypotrochoid void etoile(float cx, float cy, float r) // étoile à 5 branches { @@ -12,8 +13,10 @@ void etoile(float cx, float cy, float r) // étoile à 5 branches } } +void etoile() { etoile(0, 100, 50); } + // https://en.wikipedia.org/wiki/Epicycloid -void fleur(float cx, float cy, float rTotal, float k)//, float a=16, float b=10) // rosace +void fleur(float cx, float cy, float rTotal, float k) // rosace { float rCircleOut=rTotal/(k+1.0); float rCircleIn=rCircleOut*k; @@ -27,6 +30,8 @@ void fleur(float cx, float cy, float rTotal, float k)//, float a=16, float b=10) } } +void fleur() { fleur(0, 130, 40, 3); } + // Coeur de Raphaël Laporte // http://www.les-mathematiques.net/phorum/read.php?8,418124,418399 void coeur(float cx, float cy, float r) @@ -43,7 +48,10 @@ void coeur(float cx, float cy, float r) } } -void cercle(float cx, float cy, float r){ +void coeur() { coeur(0, 130, 40); } + +void cercle(float cx, float cy, float r) +{ float x,y; for (float t = 0; t<2*PI; t+=par) { x = r * cos(t) + cx; @@ -54,7 +62,10 @@ void cercle(float cx, float cy, float r){ } } -void spirale(float cx, float cy, float cr, float pas) { +void cercle() {cercle(0, 100, 30);} + +void spirale(float cx, float cy, float cr, float pas) +{ float x,y, ppd = pas/360; // pas par degré while (cr>3) { @@ -70,10 +81,12 @@ void spirale(float cx, float cy, float cr, float pas) { } } +void spirale() { spirale(0, 100, 50, 5); } + void droite(float x1, float y1, float x2, float y2){ float distance = sqrt(sq(x2-x1)+sq(y2-y1)); float step = pas; // d en mm - int nbPoints = 1 + (int)(distance/step); + int nbPoints = (int)(1 + distance/step); float dx=(x2-x1)/nbPoints; float dy=(y2-y1)/nbPoints; float x=x1, y=y1; @@ -112,129 +125,25 @@ void maison(float x, float y, float h){ droite(xLeft,yBottom,xRight,yBottom); } +void maison() {maison(0, 100, 50);} + +// Le code qui suit est propre à dessins.pde + void dessineListe() { - int max = liste.length; + int max = liste.length; - toAngle(liste[0], liste[1]); + toAngle(liste[0]/100., liste[1]/100.); for (int i=0; i3) { - for(int t=0; t<360; t++){ - x = cr * cos(t *(PI/180)) + cx; - y = cr * sin(t *(PI/180)) + cy; - toAngle(x,y); - moveServos(); - cr-=ppd; - if (cr<1) break; - if (debug) log("SPIRALE", t, x, y); - } - } -} - -void droite(float x1, float y1, float x2, float y2){ - float distance = sqrt(sq(x2-x1)+sq(y2-y1)); - float step = pas; // d en mm - int nbPoints = 1 + (int)(distance/step); - float dx=(x2-x1)/nbPoints; - float dy=(y2-y1)/nbPoints; - float x=x1, y=y1; - - for (int i=0; i