125225d9fbe111ba42c754f90e15334aebff9d90
[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
41 Fractal* FractalProvider::createJulia()
42 {
43 int dw = 16 * 50;
44 int dh = 16 * 30;
45
46 return new FractalJulia(dw, dh, 0.01, -0.745, -0.32, -0.09, 0.1);
47 }
48
49 ImageFonctionel* FractalProvider::createMandelbrotGL()
50 {
51 ColorRGB_01* ptrColorTitre = new ColorRGB_01(0, 0, 0);
52 return new ImageFonctionel(createMandelbrot(), ptrColorTitre); // both ptr destroy by destructor of ImageFonctionel
53 }
54
55
56 ImageFonctionel* FractalProvider::createJuliaGL()
57 {
58 ColorRGB_01* ptrColorTitre = new ColorRGB_01(0, 0, 0);
59 return new ImageFonctionel(createJulia(), ptrColorTitre); // both ptr destroy by destructor of ImageFonctionel
60 }
61
62 /*--------------------------------------*\
63 |* Private *|
64 \*-------------------------------------*/
65
66 /*----------------------------------------------------------------------*\
67 |* End *|
68 \*---------------------------------------------------------------------*/