X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/graphlib.git/blobdiff_plain/e76ea9e634775180ffbb3fd9c6479a31aeaa43fd..8f7945c4ba0202c7cee852d70cfbfbffa5c8d8b5:/test/hello.cpp diff --git a/test/hello.cpp b/test/hello.cpp index a63827b..ae6c0f3 100644 --- a/test/hello.cpp +++ b/test/hello.cpp @@ -2,14 +2,14 @@ * Pour compiler * ============= * - * 1. Créer le fichier hello.pro : + * 1. Créer le fichier hello.pro : * +------------------------------------------------------------+ * |TARGET = hello | * |CONFIG += qt debug | * |SOURCES += hello.cc | * +------------------------------------------------------------+ * - * 2. Créer le fichier Makefile avec la commande : + * 2. Créer le fichier Makefile avec la commande : * $ qmake -makefile hello.pro * ou tout simplement : * $ qmake -makefile @@ -50,7 +50,7 @@ void flip(DrawingWindow &w) void mandel(DrawingWindow &w) { - /* paramètres par défaut */ + /* paramètres par défaut */ int larg = w.width; int haut = w.height; float Rmin = -2.05; @@ -60,7 +60,7 @@ void mandel(DrawingWindow &w) int maxiter = 100; - int x, y; /* le pixel considéré */ + int x, y; /* le pixel considéré */ float cr, ci; /* le complexe correspondant */ float zr, zi; /* pour calculer la suite */ float zr2, zi2; @@ -89,7 +89,7 @@ void mandel(DrawingWindow &w) zi = 2*zr*zi + ci; zr = zr2 - zi2 + cr; } - /* on est sorti trop tôt du for(...): + /* on est sorti trop tôt du for(...): on affiche le pixel d'un couleur en fonction de i */ if (i <= maxiter / 2) { @@ -130,7 +130,7 @@ void lines(DrawingWindow &w) int y2 = rand() % ymax; w.setColor(r, g, b); w.drawLine(x1, y1, x2, y2); - if (n % 100 == 0) + //if (n % 100 == 0) w.sync(); } }