Ajout du squelette de Newton.
[GPU.git] / WCudaMSE / Student_Cuda_Image / src / cpp / core / 02_Mandelbrot_Julia / provider / FractalProvider.cpp
1 #include "FractalProvider.h"
2
3
4 /*----------------------------------------------------------------------*\
5 |* Declaration *|
6 \*---------------------------------------------------------------------*/
7
8 /*--------------------------------------*\
9 |* Imported *|
10 \*-------------------------------------*/
11
12 /*--------------------------------------*\
13 |* Public *|
14 \*-------------------------------------*/
15
16 /*--------------------------------------*\
17 |* Private *|
18 \*-------------------------------------*/
19
20 /*----------------------------------------------------------------------*\
21 |* Implementation *|
22 \*---------------------------------------------------------------------*/
23
24 /*--------------------------------------*\
25 |* Public *|
26 \*-------------------------------------*/
27
28 /*-----------------*\
29 |* static *|
30 \*----------------*/
31
32 Fractal* FractalProvider::createMandelbrot()
33 {
34 int dw = 16 * 50;
35 int dh = 16 * 30;
36
37 return new FractalMandelbrot(dw, dh, 0.2);
38 }
39
40 Fractal* FractalProvider::createJulia()
41 {
42 int dw = 16 * 50;
43 int dh = 16 * 30;
44
45 return new FractalJulia(dw, dh, 0.01, -0.745, -0.32, -0.09, 0.1);
46 }
47
48 ImageFonctionel* FractalProvider::createMandelbrotGL()
49 {
50 ColorRGB_01* ptrColorTitre = new ColorRGB_01(0, 0, 0);
51 return new ImageFonctionel(createMandelbrot(), ptrColorTitre); // both ptr destroy by destructor of ImageFonctionel
52 }
53
54
55 ImageFonctionel* FractalProvider::createJuliaGL()
56 {
57 ColorRGB_01* ptrColorTitre = new ColorRGB_01(0, 0, 0);
58 return new ImageFonctionel(createJulia(), ptrColorTitre); // both ptr destroy by destructor of ImageFonctionel
59 }
60
61 /*--------------------------------------*\
62 |* Private *|
63 \*-------------------------------------*/
64
65 /*----------------------------------------------------------------------*\
66 |* End *|
67 \*---------------------------------------------------------------------*/