Commit 3a04efe1 authored by Enzo's avatar Enzo
Browse files

eniemre modif

parent 1bcff288
......@@ -277,7 +277,7 @@
1584944062 /home/alex/Documents/phelma/informatique/kitc-phelma/fltkubuntu64/FL/Fl_Value_Slider.H
"Fl_Slider.H"
1612622275 source:/home/enzo/Documents/kitc-phelma/4projetcordesvocales/main.cpp
1616946757 source:/home/enzo/Documents/kitc-phelma/4projetcordesvocales/main.cpp
<iostream>
<FL/Fl.H>
<FL/fl_draw.H>
......@@ -297,17 +297,19 @@
1584944062 /home/enzo/Documents/kitc-phelma/fltkubuntu64/FL/fl_draw.H
"Enumerations.H"
1612622275 /home/enzo/Documents/kitc-phelma/4projetcordesvocales/main.h
1616946757 /home/enzo/Documents/kitc-phelma/4projetcordesvocales/main.h
<FL/Fl_Widget.H>
1584944062 /home/enzo/Documents/kitc-phelma/fltkubuntu64/FL/Fl_Widget.H
"Enumerations.H"
1612622275 /home/enzo/Documents/kitc-phelma/4projetcordesvocales/u1-interface.h
1616946758 /home/enzo/Documents/kitc-phelma/4projetcordesvocales/u1-interface.h
"main.h"
<FL/Fl_Double_Window.H>
<FL/Fl_Button.H>
<FL/Fl_Check_Button.H>
<FL/Fl_Tabs.H>
<FL/Fl_Group.H>
<FL/Fl_Value_Slider.H>
<FL/fl_ask.H>
......@@ -341,13 +343,13 @@
1584944062 /home/enzo/Documents/kitc-phelma/fltkubuntu64/FL/fl_ask.H
"Enumerations.H"
1612622275 /home/enzo/Documents/kitc-phelma/4projetcordesvocales/u3-callbacks.h
1616946758 /home/enzo/Documents/kitc-phelma/4projetcordesvocales/u3-callbacks.h
<FL/Fl_Widget.H>
1612690544 /home/enzo/Documents/kitc-phelma/4projetcordesvocales/u4-fonctions.h
1616946758 /home/enzo/Documents/kitc-phelma/4projetcordesvocales/u4-fonctions.h
<math.h>
1612622275 source:/home/enzo/Documents/kitc-phelma/4projetcordesvocales/u1-interface.cpp
1616946758 source:/home/enzo/Documents/kitc-phelma/4projetcordesvocales/u1-interface.cpp
<iostream>
<stdio.h>
"u1-interface.h"
......@@ -355,9 +357,9 @@
"u3-callbacks.h"
"u4-fonctions.h"
1612622275 /home/enzo/Documents/kitc-phelma/4projetcordesvocales/u2-dessin.h
1616946758 /home/enzo/Documents/kitc-phelma/4projetcordesvocales/u2-dessin.h
1612622275 source:/home/enzo/Documents/kitc-phelma/4projetcordesvocales/u2-dessin.cpp
1616949748 source:/home/enzo/Documents/kitc-phelma/4projetcordesvocales/u2-dessin.cpp
<iostream>
<FL/Fl.H>
<FL/fl_draw.H>
......@@ -365,7 +367,7 @@
"u2-dessin.h"
"u4-fonctions.h"
1612622898 source:/home/enzo/Documents/kitc-phelma/4projetcordesvocales/u3-callbacks.cpp
1616946758 source:/home/enzo/Documents/kitc-phelma/4projetcordesvocales/u3-callbacks.cpp
<iostream>
<FL/Fl.H>
<FL/fl_ask.H>
......@@ -460,7 +462,7 @@
1584944062 /home/enzo/Documents/kitc-phelma/fltkubuntu64/FL/Fl_Return_Button.H
"Fl_Button.H"
1612622720 source:/home/enzo/Documents/kitc-phelma/4projetcordesvocales/u4-fonctions.cpp
1616946758 source:/home/enzo/Documents/kitc-phelma/4projetcordesvocales/u4-fonctions.cpp
<iostream>
<stdlib.h>
<stdio.h>
......@@ -577,3 +579,6 @@
1584944062 /home/alex/Documents/phelma/informatique/kitc-phelma/fltkubuntu64/FL/Fl_Tabs.H
"Fl_Group.H"
1584944062 /home/enzo/Documents/kitc-phelma/fltkubuntu64/FL/Fl_Tabs.H
"Fl_Group.H"
......@@ -2,64 +2,57 @@
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Debug" />
<File name="u1-interface.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="u1-interface.cpp" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="17" topLine="0" />
<Cursor1 position="843" topLine="0" />
</Cursor>
</File>
<File name="u4-fonctions.h" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="u3-callbacks.cpp" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2819" topLine="36" />
<Cursor1 position="977" topLine="21" />
</Cursor>
</File>
<File name="main.cpp" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="u3-callbacks.h" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="798" topLine="98" />
<Cursor1 position="1007" topLine="1" />
</Cursor>
</File>
<File name="u1-interface.cpp" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="main.h" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="843" topLine="0" />
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="u2-dessin.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="u4-fonctions.h" open="1" top="1" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="444" topLine="0" />
<Cursor1 position="3269" topLine="42" />
</Cursor>
</File>
<File name="u3-callbacks.cpp" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="u2-dessin.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="692" topLine="63" />
<Cursor1 position="406" topLine="0" />
</Cursor>
</File>
<File name="u3-callbacks.h" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="u2-dessin.cpp" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="517" topLine="0" />
<Cursor1 position="633" topLine="0" />
</Cursor>
<Folding>
<Collapse line="30" />
</Folding>
</File>
<File name="u4-fonctions.cpp" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="u1-interface.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7116" topLine="138" />
<Cursor1 position="17" topLine="9" />
</Cursor>
<Folding>
<Collapse line="109" />
<Collapse line="117" />
<Collapse line="128" />
<Collapse line="152" />
<Collapse line="174" />
<Collapse line="201" />
<Collapse line="286" />
<Collapse line="314" />
</Folding>
</File>
<File name="u2-dessin.cpp" open="1" top="1" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="u4-fonctions.cpp" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4728" topLine="126" />
<Cursor1 position="7339" topLine="209" />
</Cursor>
</File>
<File name="main.h" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="main.cpp" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
<Cursor1 position="798" topLine="0" />
</Cursor>
</File>
</CodeBlocks_layout_file>
......@@ -133,17 +133,31 @@ void zoneDessinDessinerRessorts(double x[], double y[]) {
///création du ressort intermédiaire
double pente = calculPente(x[1], x[2], y[1], y[2]);
nbr2dents2 = 10;
xdraw = x[1] + (x[2]-x[1])/4;
ydraw = y[1]+(x[2]-x[1])*pente/4;
xgap = (x[2] - x[1])/(nbr2dents2*4);
double h = (L_ZONE - X_ZONE)/10;
double alpha = atan(pente);
nbr2dents2 = 6;
double l = x[2] - x[1];
double dl = l/float(nbr2dents2);
xgap = -h*sin(alpha);
ygap = h*cos(alpha);
fl_begin_complex_polygon();
fl_line(x[1], y[1], xdraw, ydraw);
fl_line(xdraw, ydraw, xdraw+xgap, )
fl_line(x[1], y[1], x[1] + xgap, y[1] + ygap);
for (i = 0; i < (nbr2dents2-1); i++)
{
if (i%2 == 0)
{
fl_line(x[1] + (i+1) * dl + xgap, y[1] + (i+1) * dl + ygap, x[1] + (i+2) * dl - xgap, y[1] + (i+2) * dl - ygap);
}
else
{
fl_line(x[1] + (i+1) * dl - xgap, y[1] + (i+1) * dl - ygap, x[1] + (i+2) * dl + xgap, y[1] + (i+2) * dl + ygap);
}
}
fl_line(x[1] + nbr2dents2 * dl - xgap, y[1] + nbr2dents2 * dl - ygap, x[2], y[2]);
fl_end_complex_polygon();
}
// DessinerZone à partir des données du pb
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment