Petite couleur pour différencier quand superposées
C'est des niveaux de gris :° 😎
This commit is contained in:
parent
a8f5d7965a
commit
d26b9b1f96
20
main.c
20
main.c
@ -93,7 +93,13 @@ void ligne(int index, float hgx, float hgy, float bdx, float bdy)
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glOrtho(-1.0,1.0,-1.0,1.0,-1.0,1.0);
|
||||
glColor3f(1.0,1.0,1.0);
|
||||
|
||||
float color = 1.0;
|
||||
if(mode_affichage == SUPERPOSER)
|
||||
color = map(0, nc, index, 0.5, 1.0);
|
||||
|
||||
glColor3f(color, color, color);
|
||||
|
||||
glBegin(GL_LINE_STRIP);
|
||||
|
||||
unsigned int size = (unsigned int)courbe[index][0];
|
||||
@ -158,7 +164,13 @@ void histo(int index, float hgx, float hgy, float bdx, float bdy)
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glOrtho(-1.0,1.0,-1.0,1.0,-1.0,1.0);
|
||||
glColor3f(1.0,1.0,1.0);
|
||||
|
||||
float color = 1.0;
|
||||
if(mode_affichage == SUPERPOSER)
|
||||
color = map(0, nc, index, 0.5, 1.0);
|
||||
|
||||
glColor3f(color, color, color);
|
||||
|
||||
//glBegin(GL_POLYGON);
|
||||
|
||||
unsigned int size = (unsigned int)courbe[index][0];
|
||||
@ -431,8 +443,8 @@ int main(int argc, char* argv[])
|
||||
|
||||
printCourbeTerminal();
|
||||
|
||||
type_dessin = LIGNE_AXES;
|
||||
mode_affichage = VERTICAL;
|
||||
type_dessin = HISTOGRAMME;
|
||||
mode_affichage = HORIZONTAL;
|
||||
int window = initWindow(argc, argv, afficher);
|
||||
|
||||
glutMainLoop();
|
||||
|
Loading…
Reference in New Issue
Block a user