Cleanage.
authorgburri <gregory.burri@master.hes-so.ch>
Thu, 18 Dec 2014 12:53:25 +0000 (13:53 +0100)
committergburri <gregory.burri@master.hes-so.ch>
Thu, 18 Dec 2014 12:53:25 +0000 (13:53 +0100)
19 files changed:
WCudaMSE/BilatTools_Cuda_Image/src/core/cudaImageTools/bitmap/cpp/Image.cpp
WCudaMSE/BilatTools_Cuda_Image/src/core/cudaImageTools/bitmap/header/Animable_I.h
WCudaMSE/BilatTools_Cuda_Image/src/core/cudaImageTools/bitmap/header/Image.h
WCudaMSE/BilatTools_Cuda_Image/src/core/cudaImageTools/fonctionel/cpp/ImageFonctionel.cpp
WCudaMSE/BilatTools_Cuda_Image/src/core/cudaImageTools/fonctionel/header/AnimableFonctionel_I.h
WCudaMSE/BilatTools_Cuda_Image/src/core/cudaImageTools/fonctionel/header/ImageFonctionel.h
WCudaMSE/RELEASE/doc/Student_Cuda_64.doc.tar.gz [deleted file]
WCudaMSE/Student_Cuda_Image/src/cpp/core/01_Rippling/moo/host/Rippling.h
WCudaMSE/Student_Cuda_Image/src/cpp/core/02_Mandelbrot_Julia/moo/device/FractalDevice.cu
WCudaMSE/Student_Cuda_Image/src/cpp/core/02_Mandelbrot_Julia/moo/device/FractalDevice.h [new file with mode: 0644]
WCudaMSE/Student_Cuda_Image/src/cpp/core/02_Mandelbrot_Julia/moo/host/Fractal.cu
WCudaMSE/Student_Cuda_Image/src/cpp/core/02_Mandelbrot_Julia/moo/host/Fractal.h
WCudaMSE/Student_Cuda_Image/src/cpp/core/02_Mandelbrot_Julia/provider/FractalProvider.cpp
WCudaMSE/Student_Cuda_Image/src/cpp/core/04_RayTracing/moo/device/Sphere.h
WCudaMSE/Student_Cuda_Image/src/cpp/core/04_RayTracing/moo/host/RayTracing.cu
WCudaMSE/Student_Cuda_Image/src/cpp/core/04_RayTracing/moo/host/RayTracing.h
WCudaMSE/Student_Cuda_Image/src/cpp/core/05_HeatTransfert/moo/host/HeatTransfert.cu
WCudaMSE/Student_Cuda_Image/src/cpp/core/05_HeatTransfert/moo/host/HeatTransfert.h
WCudaMSE/Student_Cuda_Image/src/cpp/core/mainGL.cpp

index 5ae2097..fa0eedf 100755 (executable)
@@ -38,6 +38,9 @@ Image::Image(Animable_I* ptrAnimable,ColorRGB_01* ptrColorTitreRGB) :
     {\r
     this->ptrAnimable = ptrAnimable;\r
     this->ptrColorTitreRGB=ptrColorTitreRGB;\r
     {\r
     this->ptrAnimable = ptrAnimable;\r
     this->ptrColorTitreRGB=ptrColorTitreRGB;\r
+\r
+    this->valueNames = ptrAnimable->getNames();\r
+    this->values = new float[this->valueNames.size()];\r
     }\r
 \r
 Image::~Image(void)\r
     }\r
 \r
 Image::~Image(void)\r
@@ -80,9 +83,16 @@ void Image::paintPrimitives(Graphic2Ds& graphic2D) // redefinition
 \r
     // top\r
        {\r
 \r
     // top\r
        {\r
-       float t = ptrAnimable->getT();\r
-       string message = "t = " + StringTools::toString(t);\r
-       graphic2D.drawTitleTop(message, ptrfont);\r
+        string title;\r
+        this->ptrAnimable->getValues(this->values);\r
+        for (int i = 0; i < this->valueNames.size(); i++)\r
+            {\r
+            if (i != 0)\r
+                title += ", ";\r
+            title += this->valueNames[i];\r
+            title += StringTools::toString(this->values[i]);\r
+            }\r
+        graphic2D.drawTitleTop(title, ptrfont);\r
        }\r
 \r
     // bottom\r
        }\r
 \r
     // bottom\r
index b421793..e50d301 100755 (executable)
@@ -1,10 +1,10 @@
 #ifndef ANIMABLE_I_H_\r
 #define ANIMABLE_I_H_\r
 \r
 #ifndef ANIMABLE_I_H_\r
 #define ANIMABLE_I_H_\r
 \r
-#include <iostream>\r
-#include "cudaTools.h"\r
+#include <string>\r
+#include <vector>\r
 \r
 \r
-using std::string;\r
+#include "cudaTools.h"\r
 \r
 /*----------------------------------------------------------------------*\\r
  |*                    Declaration                                     *|\r
 \r
 /*----------------------------------------------------------------------*\\r
  |*                    Declaration                                     *|\r
@@ -25,12 +25,15 @@ class Animable_I
        virtual int getW()=0;\r
        virtual int getH()=0;\r
 \r
        virtual int getW()=0;\r
        virtual int getH()=0;\r
 \r
-       /**\r
-        * getParaAnimation\r
-        */\r
-       virtual float getT() = 0;\r
+        /**\r
+         * Ancienne version de l'interface.\r
+         */\r
+       virtual float getT() { return 0.0; };\r
+\r
+        virtual std::vector<std::string> getNames() { std::vector<std::string> def; def.push_back("t = "); return def; }\r
+        virtual void getValues(float* values) { values[0] = this->getT(); }\r
 \r
 \r
-       virtual string getTitle() = 0;\r
+       virtual std::string getTitle() = 0;\r
     };\r
 \r
 #endif\r
     };\r
 \r
 #endif\r
index 69729c6..d68ec99 100755 (executable)
@@ -54,6 +54,9 @@ class Image: public ImageMOOs_A
        // Input\r
        Animable_I* ptrAnimable;\r
        ColorRGB_01* ptrColorTitreRGB;\r
        // Input\r
        Animable_I* ptrAnimable;\r
        ColorRGB_01* ptrColorTitreRGB;\r
+\r
+        std::vector<std::string> valueNames;\r
+        float* values;\r
     };\r
 \r
 #endif\r
     };\r
 \r
 #endif\r
index af78e9e..899519f 100755 (executable)
@@ -42,14 +42,16 @@ ImageFonctionel::ImageFonctionel(AnimableFonctionel_I* ptrAnimable, ColorRGB_01*
     {\r
     this->ptrAnimable = ptrAnimable;\r
     this->ptrColorTitreRGB = ptrColorTitreRGB;\r
     {\r
     this->ptrAnimable = ptrAnimable;\r
     this->ptrColorTitreRGB = ptrColorTitreRGB;\r
-    this->tName = ptrAnimable->getTName();\r
+    this->valueNames = ptrAnimable->getNames();\r
+    this->values = new float[this->valueNames.size()];\r
 \r
     setEnableDomaineOverlay(true);\r
     }\r
 \r
 ImageFonctionel::~ImageFonctionel(void)\r
     {\r
 \r
     setEnableDomaineOverlay(true);\r
     }\r
 \r
 ImageFonctionel::~ImageFonctionel(void)\r
     {\r
-    delete ptrAnimable;\r
+    delete this->ptrAnimable;\r
+    delete[] this->values;\r
     }\r
 \r
 /**\r
     }\r
 \r
 /**\r
@@ -87,9 +89,16 @@ void ImageFonctionel::paintPrimitives(Graphic2Ds& graphic2D) // redefinition
 \r
     // top\r
        {\r
 \r
     // top\r
        {\r
-       float t = ptrAnimable->getT();\r
-       string message = this->tName + StringTools::toString(t);\r
-       graphic2D.drawTitleTop(message, ptrfont);\r
+        string title;\r
+        this->ptrAnimable->getValues(this->values);\r
+        for (int i = 0; i < this->valueNames.size(); i++)\r
+            {\r
+            if (i != 0)\r
+                title += ", ";\r
+            title += this->valueNames[i];\r
+            title += StringTools::toString(this->values[i]);\r
+            }\r
+       graphic2D.drawTitleTop(title, ptrfont);\r
        }\r
 \r
     // bottom\r
        }\r
 \r
     // bottom\r
index d5a2efd..d562b05 100755 (executable)
@@ -2,14 +2,12 @@
 #define ANIMABLE_FONCTIONEL_I_H_\r
 \r
 #include <iostream>\r
 #define ANIMABLE_FONCTIONEL_I_H_\r
 \r
 #include <iostream>\r
+#include <vector>\r
+#include <string>\r
 \r
 #include "cudaTools.h"\r
 #include "DomaineMath.h"\r
 \r
 \r
 #include "cudaTools.h"\r
 #include "DomaineMath.h"\r
 \r
-using std::string;\r
-\r
-\r
-\r
 /*----------------------------------------------------------------------*\\r
  |*                    Declaration                                     *|\r
  \*---------------------------------------------------------------------*/\r
 /*----------------------------------------------------------------------*\\r
  |*                    Declaration                                     *|\r
  \*---------------------------------------------------------------------*/\r
@@ -31,12 +29,14 @@ class AnimableFonctionel_I
        virtual DomaineMath* getDomaineMathInit(void)=0;\r
 \r
        /**\r
        virtual DomaineMath* getDomaineMathInit(void)=0;\r
 \r
        /**\r
-        * getParaAnimation\r
+        * Ancienne version de l'interface.\r
         */\r
         */\r
-       virtual float getT(void)=0;\r
-       virtual string getTName() { return "t = "; }\r
+       virtual float getT(void) { return 0.0; };\r
+\r
+       virtual std::vector<std::string> getNames() { std::vector<std::string> def; def.push_back("t = "); return def; }\r
+       virtual void getValues(float* values) { values[0] = this->getT(); }\r
 \r
 \r
-       virtual string getTitle(void)=0;\r
+       virtual std::string getTitle(void)=0;\r
     };\r
 \r
 #endif\r
     };\r
 \r
 #endif\r
index d0c1f6b..0c5ad17 100755 (executable)
@@ -1,14 +1,14 @@
 #ifndef IMAGE_FONCTIONEL_H_\r
 #define IMAGE_FONCTIONEL_H_\r
 \r
 #ifndef IMAGE_FONCTIONEL_H_\r
 #define IMAGE_FONCTIONEL_H_\r
 \r
+#include <vector>\r
+\r
 #include "ImageFonctionelMOOs_A.h"\r
 #include "MathTools.h"\r
 #include "ColorRGB_01.h"\r
 \r
 #include "AnimableFonctionel_I.h"\r
 \r
 #include "ImageFonctionelMOOs_A.h"\r
 #include "MathTools.h"\r
 #include "ColorRGB_01.h"\r
 \r
 #include "AnimableFonctionel_I.h"\r
 \r
-\r
-\r
 /*----------------------------------------------------------------------*\\r
  |*                    Declaration                                     *|\r
  \*---------------------------------------------------------------------*/\r
 /*----------------------------------------------------------------------*\\r
  |*                    Declaration                                     *|\r
  \*---------------------------------------------------------------------*/\r
@@ -50,12 +50,11 @@ class ImageFonctionel: public ImageFonctionelMOOs_A
        \*-------------------------------------*/\r
 \r
     private:\r
        \*-------------------------------------*/\r
 \r
     private:\r
-\r
-       // Input\r
        AnimableFonctionel_I* ptrAnimable;\r
        ColorRGB_01* ptrColorTitreRGB;\r
 \r
        AnimableFonctionel_I* ptrAnimable;\r
        ColorRGB_01* ptrColorTitreRGB;\r
 \r
-       string tName;\r
+       std::vector<std::string> valueNames;\r
+       float* values;\r
     };\r
 \r
 #endif\r
     };\r
 \r
 #endif\r
diff --git a/WCudaMSE/RELEASE/doc/Student_Cuda_64.doc.tar.gz b/WCudaMSE/RELEASE/doc/Student_Cuda_64.doc.tar.gz
deleted file mode 100644 (file)
index 95bf645..0000000
Binary files a/WCudaMSE/RELEASE/doc/Student_Cuda_64.doc.tar.gz and /dev/null differ
index 0eb853e..b9ea8f4 100755 (executable)
@@ -1,8 +1,8 @@
 #ifndef RIPPLING_H_\r
 #define RIPPLING_H_\r
 \r
 #ifndef RIPPLING_H_\r
 #define RIPPLING_H_\r
 \r
-#include "cudaTools.h"\r
 #include "Animable_I.h"\r
 #include "Animable_I.h"\r
+#include "cudaTools.h"\r
 #include "MathTools.h"\r
 \r
 /*----------------------------------------------------------------------*\\r
 #include "MathTools.h"\r
 \r
 /*----------------------------------------------------------------------*\\r
@@ -41,7 +41,7 @@ class Rippling: public Animable_I
        virtual int getW(void);\r
        virtual int getH(void);\r
 \r
        virtual int getW(void);\r
        virtual int getH(void);\r
 \r
-       virtual string getTitle(void);\r
+       virtual std::string getTitle(void);\r
 \r
     private:\r
 \r
 \r
     private:\r
 \r
@@ -62,7 +62,7 @@ class Rippling: public Animable_I
        float t;\r
 \r
        //Outputs\r
        float t;\r
 \r
        //Outputs\r
-       string title;\r
+       std::string title;\r
     };\r
 \r
 #endif\r
     };\r
 \r
 #endif\r
index 997b32b..a98ed36 100755 (executable)
@@ -1,8 +1,9 @@
+#include "FractalDevice.h"\r
+\r
 #include <iostream>\r
 \r
 #include "Indice2D.h"\r
 #include "IndiceTools.h"\r
 #include <iostream>\r
 \r
 #include "Indice2D.h"\r
 #include "IndiceTools.h"\r
-#include "DomaineMath.h"\r
 #include "cudaTools.h"\r
 #include "Device.h"\r
 \r
 #include "cudaTools.h"\r
 #include "Device.h"\r
 \r
 using std::cout;\r
 using std::endl;\r
 \r
 using std::cout;\r
 using std::endl;\r
 \r
-__global__ void fractalMandelbrot(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath, int n);\r
-__global__ void fractalJulia(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath, int n, float c_r, float c_i);\r
-__device__ void fractal(uchar4* ptrDevPixels, int w, int h, const DomaineMath& domaineMath, int n, const FractalMath& fractalMath);\r
-\r
-__global__ void fractalMandelbrot(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath, int n)\r
-    {\r
-    FractalMandelbrotMath fractalMath(n);\r
-    fractal(ptrDevPixels, w, h, domaineMath, n, fractalMath);\r
-    }\r
-\r
-__global__ void fractalJulia(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath, int n, float c_r, float c_i)\r
-    {\r
-    FractalJuliaMath fractalMath(n, c_r, c_i);\r
-    fractal(ptrDevPixels, w, h, domaineMath, n, fractalMath);\r
-    }\r
-\r
 __device__ void fractal(uchar4* ptrDevPixels, int w, int h, const DomaineMath& domaineMath, int n, const FractalMath& fractalMath)\r
     {\r
     const int TID = Indice2D::tid();\r
 __device__ void fractal(uchar4* ptrDevPixels, int w, int h, const DomaineMath& domaineMath, int n, const FractalMath& fractalMath)\r
     {\r
     const int TID = Indice2D::tid();\r
@@ -55,3 +40,16 @@ __device__ void fractal(uchar4* ptrDevPixels, int w, int h, const DomaineMath& d
         s += NB_THREAD;\r
         }\r
     }\r
         s += NB_THREAD;\r
         }\r
     }\r
+\r
+__global__ void fractalMandelbrot(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath, int n)\r
+    {\r
+    FractalMandelbrotMath fractalMath(n);\r
+    fractal(ptrDevPixels, w, h, domaineMath, n, fractalMath);\r
+    }\r
+\r
+__global__ void fractalJulia(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath, int n, float c_r, float c_i)\r
+    {\r
+    FractalJuliaMath fractalMath(n, c_r, c_i);\r
+    fractal(ptrDevPixels, w, h, domaineMath, n, fractalMath);\r
+    }\r
+\r
diff --git a/WCudaMSE/Student_Cuda_Image/src/cpp/core/02_Mandelbrot_Julia/moo/device/FractalDevice.h b/WCudaMSE/Student_Cuda_Image/src/cpp/core/02_Mandelbrot_Julia/moo/device/FractalDevice.h
new file mode 100644 (file)
index 0000000..137aab2
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef FRACTALDEVICE_H_
+#define FRACTALDEVICE_H_
+
+#include "DomaineMath.h"
+
+__global__ void fractalMandelbrot(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath, int n);
+__global__ void fractalJulia(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath, int n, float c_r, float c_i);
+
+#endif
index 88a225b..bfaff4b 100755 (executable)
@@ -1,20 +1,17 @@
+#include "Fractal.h"\r
+\r
 #include <iostream>\r
 #include <assert.h>\r
 #include <iostream>\r
 #include <assert.h>\r
+using namespace std;\r
 \r
 \r
-#include "Fractal.h"\r
+#include "FractalDevice.h"\r
 #include "Device.h"\r
 \r
 #include "Device.h"\r
 \r
-using std::cout;\r
-using std::endl;\r
-\r
-extern __global__ void fractalMandelbrot(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath, int n);\r
-extern __global__ void fractalJulia(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath, int n, float c_r, float c_i);\r
-\r
-Fractal::Fractal(int w, int h)\r
-    : w(w), h(h),\r
-      dg(8, 8, 1),\r
-      db(16, 16, 1),\r
-      title("Fractal Cuda")\r
+Fractal::Fractal(int w, int h) :\r
+        w(w), h(h),\r
+        dg(8, 8, 1),\r
+        db(16, 16, 1),\r
+        title("Fractal Cuda")\r
     {\r
     //print(dg, db);\r
     Device::assertDim(dg, db);\r
     {\r
     //print(dg, db);\r
     Device::assertDim(dg, db);\r
@@ -56,8 +53,10 @@ string Fractal::getTitle()
 \r
 /////\r
 \r
 \r
 /////\r
 \r
-FractalMandelbrot::FractalMandelbrot(int w, int h, float dn)\r
-    : Fractal(w, h), variateurAnimationN(IntervalF(30, 100), dn)\r
+FractalMandelbrot::FractalMandelbrot(int w, int h, int dn) :\r
+        Fractal(w, h),\r
+        variateurAnimationN(IntervalI(10, 100), dn),\r
+        n(0)\r
     {\r
     this->ptrDomaineMathInit = new DomaineMath(-2, -1.3, 0.8, 1.3);\r
     }\r
     {\r
     this->ptrDomaineMathInit = new DomaineMath(-2, -1.3, 0.8, 1.3);\r
     }\r
@@ -67,9 +66,16 @@ void FractalMandelbrot::animationStep()
     this->n = this->variateurAnimationN.varierAndGet();\r
     }\r
 \r
     this->n = this->variateurAnimationN.varierAndGet();\r
     }\r
 \r
-float FractalMandelbrot::getT()\r
+vector<string> FractalMandelbrot::getNames()\r
     {\r
     {\r
-    return this->n;\r
+    vector<string> name;\r
+    name.push_back("n = ");\r
+    return name;\r
+    }\r
+\r
+void FractalMandelbrot::getValues(float* values)\r
+    {\r
+    values[0] = float(this->n);\r
     }\r
 \r
 void FractalMandelbrot::runGPU(uchar4* ptrDevPixels, const DomaineMath& domaineMath)\r
     }\r
 \r
 void FractalMandelbrot::runGPU(uchar4* ptrDevPixels, const DomaineMath& domaineMath)\r
@@ -79,8 +85,13 @@ void FractalMandelbrot::runGPU(uchar4* ptrDevPixels, const DomaineMath& domaineM
 \r
 /////\r
 \r
 \r
 /////\r
 \r
-FractalJulia::FractalJulia(int w, int h, float dn, float z_r_min, float z_r_max, float z_i_min, float z_i_max)\r
-    : Fractal(w, h), z_r(z_r_min), z_i(z_i_min), variateurAnimationR(IntervalF(-0.8, -0.7), 0.0005), variateurAnimationI(IntervalF(-0.3, 0.3/*0.15*/), 0.0004)\r
+FractalJulia::FractalJulia(int w, int h, int n, float z_r_min, float z_r_max, float z_i_min, float z_i_max) :\r
+        Fractal(w, h),\r
+        n(n),\r
+        z_r(z_r_min),\r
+        z_i(z_i_min),\r
+        variateurAnimationR(IntervalF(-0.8, -0.7), 0.0005),\r
+        variateurAnimationI(IntervalF(-0.3, 0.3), 0.0004)\r
     {\r
     this->ptrDomaineMathInit = new DomaineMath(-1.7, -1.4, 1.7, 1.4);\r
     }\r
     {\r
     this->ptrDomaineMathInit = new DomaineMath(-1.7, -1.4, 1.7, 1.4);\r
     }\r
@@ -91,13 +102,22 @@ void FractalJulia::animationStep()
     this->z_i = this->variateurAnimationI.varierAndGet();\r
     }\r
 \r
     this->z_i = this->variateurAnimationI.varierAndGet();\r
     }\r
 \r
-float FractalJulia::getT()\r
+vector<string> FractalJulia::getNames()\r
+    {\r
+    vector<string> name;\r
+    name.push_back("z_r = ");\r
+    name.push_back("z_i = ");\r
+    return name;\r
+    }\r
+\r
+void FractalJulia::getValues(float* values)\r
     {\r
     {\r
-    return this->z_r;\r
+    values[0] = this->z_r;\r
+    values[1] = this->z_i;\r
     }\r
 \r
 void FractalJulia::runGPU(uchar4* ptrDevPixels, const DomaineMath& domaineMath)\r
     {\r
     }\r
 \r
 void FractalJulia::runGPU(uchar4* ptrDevPixels, const DomaineMath& domaineMath)\r
     {\r
-    fractalJulia<<<dg,db>>>(ptrDevPixels, this->w, this->h, domaineMath, 300, this->z_r, this->z_i);\r
+    fractalJulia<<<dg,db>>>(ptrDevPixels, this->w, this->h, domaineMath, this->n, this->z_r, this->z_i);\r
     }\r
 \r
     }\r
 \r
index d9b8841..5ad7b83 100755 (executable)
@@ -1,9 +1,13 @@
 #ifndef FRACTAL_H_\r
 #define FRACTAL_H_\r
 \r
 #ifndef FRACTAL_H_\r
 #define FRACTAL_H_\r
 \r
+#include <vector>\r
+#include <string>\r
+\r
 #include "cudaTools.h"\r
 #include "AnimableFonctionel_I.h"\r
 #include "MathTools.h"\r
 #include "cudaTools.h"\r
 #include "AnimableFonctionel_I.h"\r
 #include "MathTools.h"\r
+#include "VariateurI.h"\r
 #include "VariateurF.h"\r
 \r
 class Fractal : public AnimableFonctionel_I\r
 #include "VariateurF.h"\r
 \r
 class Fractal : public AnimableFonctionel_I\r
@@ -37,31 +41,36 @@ class Fractal : public AnimableFonctionel_I
 class FractalMandelbrot : public Fractal\r
     {\r
     public:\r
 class FractalMandelbrot : public Fractal\r
     {\r
     public:\r
-        FractalMandelbrot(int w, int h, float dn);\r
+        FractalMandelbrot(int w, int h, int dn);\r
         void animationStep();\r
         void animationStep();\r
-        float getT() /*override*/;\r
+\r
+        std::vector<std::string> getNames();\r
+        void getValues(float* values);\r
 \r
     private:\r
         void runGPU(uchar4* ptrDevPixels, const DomaineMath& domaineMath) /*override*/;\r
 \r
 \r
     private:\r
         void runGPU(uchar4* ptrDevPixels, const DomaineMath& domaineMath) /*override*/;\r
 \r
-        VariateurF variateurAnimationN;\r
-\r
-        float n;\r
+        VariateurI variateurAnimationN;\r
+        int n;\r
     };\r
 \r
 class FractalJulia : public Fractal\r
     {\r
     public:\r
     };\r
 \r
 class FractalJulia : public Fractal\r
     {\r
     public:\r
-        FractalJulia(int w, int h, float dn, float z_r_min, float z_r_max, float z_i_min, float z_i_max);\r
+        FractalJulia(int w, int h, int n, float z_r_min, float z_r_max, float z_i_min, float z_i_max);\r
         void animationStep();\r
         void animationStep();\r
-        float getT() /*override*/;\r
+\r
+        std::vector<std::string> getNames();\r
+        void getValues(float* values);\r
 \r
     private:\r
         void runGPU(uchar4* ptrDevPixels, const DomaineMath& domaineMath) /*override*/;\r
 \r
 \r
     private:\r
         void runGPU(uchar4* ptrDevPixels, const DomaineMath& domaineMath) /*override*/;\r
 \r
+        const int n;\r
+\r
         float z_r, z_i;\r
         float z_r, z_i;\r
-        VariateurF variateurAnimationI;\r
-        VariateurF variateurAnimationR;\r
+        VariateurF variateurAnimationI; // Variateur pour z_i.\r
+        VariateurF variateurAnimationR; // Variateur pour z_r.\r
     };\r
 \r
 #endif\r
     };\r
 \r
 #endif\r
index 5282d85..ba94d73 100755 (executable)
@@ -5,7 +5,7 @@ Fractal* MandelbrotProvider::create()
     int dw = 16 * 50;\r
     int dh = 16 * 30;\r
 \r
     int dw = 16 * 50;\r
     int dh = 16 * 30;\r
 \r
-    return new FractalMandelbrot(dw, dh, 0.2);\r
+    return new FractalMandelbrot(dw, dh, 1);\r
     }\r
 \r
 Fractal* JuliaProvider::create()\r
     }\r
 \r
 Fractal* JuliaProvider::create()\r
@@ -13,18 +13,17 @@ Fractal* JuliaProvider::create()
     int dw = 16 * 50;\r
     int dh = 16 * 30;\r
 \r
     int dw = 16 * 50;\r
     int dh = 16 * 30;\r
 \r
-    return new FractalJulia(dw, dh, 0.01, -0.745, -0.32, -0.09, 0.1);\r
+    return new FractalJulia(dw, dh, 300, -0.745, -0.32, -0.09, 0.1);\r
     }\r
 \r
 ImageFonctionel* MandelbrotProvider::createGL()\r
     {\r
     }\r
 \r
 ImageFonctionel* MandelbrotProvider::createGL()\r
     {\r
-    ColorRGB_01* ptrColorTitre = new ColorRGB_01(0, 0, 0);\r
+    ColorRGB_01* ptrColorTitre = new ColorRGB_01(0, 0, 100);\r
     return new ImageFonctionel(create(), ptrColorTitre); // both ptr destroy by destructor of ImageFonctionel\r
     }\r
 \r
     return new ImageFonctionel(create(), ptrColorTitre); // both ptr destroy by destructor of ImageFonctionel\r
     }\r
 \r
-\r
 ImageFonctionel* JuliaProvider::createGL()\r
     {\r
 ImageFonctionel* JuliaProvider::createGL()\r
     {\r
-    ColorRGB_01* ptrColorTitre = new ColorRGB_01(0, 0, 0);\r
+    ColorRGB_01* ptrColorTitre = new ColorRGB_01(0, 0, 100);\r
     return new ImageFonctionel(create(), ptrColorTitre); // both ptr destroy by destructor of ImageFonctionel\r
     }\r
     return new ImageFonctionel(create(), ptrColorTitre); // both ptr destroy by destructor of ImageFonctionel\r
     }\r
index 0567fb8..a437dab 100644 (file)
@@ -2,14 +2,13 @@
 #define SPHERE_H
 
 #include "cudaTools.h"
 #define SPHERE_H
 
 #include "cudaTools.h"
-#include "cudaType_CPU.h"
 #include "MathTools.h"
 
 class Sphere
     {
     public:
         __host__
 #include "MathTools.h"
 
 class Sphere
     {
     public:
         __host__
-        Sphere(cpu::float3 centre, float r, float hue) :
+        Sphere(float3 centre, float r, float hue) :
             centre(centre),
             hueInitial(hue)
             {
             centre(centre),
             hueInitial(hue)
             {
@@ -22,7 +21,7 @@ class Sphere
             }
 
         __host__
             }
 
         __host__
-        void setCentre(const cpu::float3& centre)
+        void setCentre(const float3& centre)
             {
             this->centre = centre;
             }
             {
             this->centre = centre;
             }
@@ -41,7 +40,7 @@ class Sphere
             }
 
         __device__
             }
 
         __device__
-        float hCarre(cpu::float2 xySol)
+        float hCarre(float2 xySol)
             {
             float a = (centre.x - xySol.x);
             float b = (centre.y - xySol.y);
             {
             float a = (centre.x - xySol.x);
             float b = (centre.y - xySol.y);
@@ -86,7 +85,7 @@ class Sphere
 
     private:
         float r;
 
     private:
         float r;
-        cpu::float3 centre;
+        float3 centre;
         float hueInitial;
         float rCarre;
 
         float hueInitial;
         float rCarre;
 
index 5034594..1623820 100644 (file)
@@ -32,12 +32,12 @@ void RayTracing::runGPU(uchar4* ptrDevPixels)
     {
     rayTracing<<<dg,db>>>(ptrDevPixels, this->w, this->h, this->t);
 
     {
     rayTracing<<<dg,db>>>(ptrDevPixels, this->w, this->h, this->t);
 
-    HANDLE_ERROR(cudaDeviceSynchronize()); // Pour flusher les 'printf' (pour le DEBUG).
+    // HANDLE_ERROR(cudaDeviceSynchronize()); // Pour flusher les 'printf' (pour le DEBUG).
     }
 
 void RayTracing::animationStep()
     {
     }
 
 void RayTracing::animationStep()
     {
-    this->t += 0.1; // TODO
+    this->t += 0.1; // TODO.
     }
 
 int RayTracing::getW()
     }
 
 int RayTracing::getW()
@@ -69,7 +69,7 @@ Sphere* RayTracing::createSpheres(int n)
         {
         spheres[i].setR(float(this->alea.uniformeAB(20, this->w / 10 - 1)));
 
         {
         spheres[i].setR(float(this->alea.uniformeAB(20, this->w / 10 - 1)));
 
-        cpu::float3 centre
+        float3 centre
             {
             float(this->alea.uniformeAB(double(bord), double(this->w - bord))),
             float(this->alea.uniformeAB(double(bord), double(this->h - bord))),
             {
             float(this->alea.uniformeAB(double(bord), double(this->w - bord))),
             float(this->alea.uniformeAB(double(bord), double(this->h - bord))),
index 5c0e77d..313fa6b 100644 (file)
@@ -4,7 +4,7 @@
 #include "cudaTools.h"
 #include "Animable_I.h"
 #include "MathTools.h"
 #include "cudaTools.h"
 #include "Animable_I.h"
 #include "MathTools.h"
-#include "cudaType_CPU.h"
+#include "AleaTools.h"
 
 #include "Sphere.h"
 
 
 #include "Sphere.h"
 
@@ -22,7 +22,7 @@ class RayTracing : public Animable_I
 
         float getT() /*override*/;
 
 
         float getT() /*override*/;
 
-        string getTitle(void) /*override*/;
+        std::string getTitle(void) /*override*/;
 
     private:
         Sphere* createSpheres(int n);
 
     private:
         Sphere* createSpheres(int n);
@@ -37,7 +37,7 @@ class RayTracing : public Animable_I
         const dim3 dg;
         const dim3 db;
 
         const dim3 dg;
         const dim3 db;
 
-        const string title;
+        const std::string title;
     };
 
 #endif
     };
 
 #endif
index 613e576..0818f52 100755 (executable)
@@ -95,19 +95,19 @@ void HeatTransfert::setHeaters(HeatImage& image)
     const float tempCentre = 1.0;\r
     const float tempCotes = 0.2;\r
 \r
     const float tempCentre = 1.0;\r
     const float tempCotes = 0.2;\r
 \r
-    for (int x = 179; x <= 195; x++)\r
+    for (int x = 279; x <= 295; x++)\r
         {\r
         {\r
-        for (int y = 179; y <= 195; y++)\r
+        for (int y = 279; y <= 295; y++)\r
             image.set(x, y, tempCotes);\r
             image.set(x, y, tempCotes);\r
-        for (int y = 605; y <= 621; y++)\r
+        for (int y = 505; y <= 521; y++)\r
             image.set(x, y, tempCotes);\r
         }\r
 \r
             image.set(x, y, tempCotes);\r
         }\r
 \r
-    for (int x = 605; x <= 621; x++)\r
+    for (int x = 505; x <= 521; x++)\r
         {\r
         {\r
-        for (int y = 179; y <= 195; y++)\r
+        for (int y = 279; y <= 295; y++)\r
             image.set(x, y, tempCotes);\r
             image.set(x, y, tempCotes);\r
-        for (int y = 605; y <= 621; y++)\r
+        for (int y = 505; y <= 521; y++)\r
             image.set(x, y, tempCotes);\r
         }\r
 \r
             image.set(x, y, tempCotes);\r
         }\r
 \r
index bd6882f..ace12be 100755 (executable)
@@ -24,7 +24,7 @@ class HeatTransfert : public Animable_I
 \r
         float getT() /*override*/;\r
 \r
 \r
         float getT() /*override*/;\r
 \r
-        string getTitle(void) /*override*/;\r
+        std::string getTitle(void) /*override*/;\r
 \r
     private:\r
         static void setHeaters(HeatImage& image);\r
 \r
     private:\r
         static void setHeaters(HeatImage& image);\r
@@ -40,7 +40,7 @@ class HeatTransfert : public Animable_I
         const dim3 dg;\r
         const dim3 db;\r
 \r
         const dim3 dg;\r
         const dim3 db;\r
 \r
-        const string title;\r
+        const std::string title;\r
     };\r
 \r
 #endif\r
     };\r
 \r
 #endif\r
index ecda2fd..fe29a86 100755 (executable)
@@ -39,9 +39,9 @@ int mainGL(void)
     {\r
     // Viewer<Rippling0Image, Rippling0Provider> rippling0(true, true, 10, 10);\r
     // Viewer<Image, RipplingProvider> rippling0(true, true, 10, 10);\r
     {\r
     // Viewer<Rippling0Image, Rippling0Provider> rippling0(true, true, 10, 10);\r
     // Viewer<Image, RipplingProvider> rippling0(true, true, 10, 10);\r
-    // Viewer<ImageFonctionel, MandelbrotProvider> fractalMandelbrot(true, true, 20, 20);\r
+    Viewer<ImageFonctionel, MandelbrotProvider> fractalMandelbrot(true, true, 20, 20);\r
     // Viewer<ImageFonctionel, JuliaProvider> fractalJulia(true, true, 30, 30);\r
     // Viewer<ImageFonctionel, JuliaProvider> fractalJulia(true, true, 30, 30);\r
-    Viewer<ImageFonctionel, NewtonProvider> newtown(true, true, 20, 20);\r
+    // Viewer<ImageFonctionel, NewtonProvider> newtown(true, true, 20, 20);\r
     // Viewer<Image, HeatTransfertProvider> heatTransfert(true, false, 20, 20);\r
     // Viewer<ImageFonctionel, RayTracingProvider> rayTracing(true, true, 20, 20);\r
 \r
     // Viewer<Image, HeatTransfertProvider> heatTransfert(true, false, 20, 20);\r
     // Viewer<ImageFonctionel, RayTracingProvider> rayTracing(true, true, 20, 20);\r
 \r