Commencement du labo Mandelbrot et Julia.
[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::create()
33 {
34 int dw = 16 * 30;
35 int dh = 16 * 30;
36
37 float dt = 2 * PI / 8000;
38 int n = 2;
39
40 return new Fractal(dw, dh, dt, n);
41 }
42
43 ImageFonctionel* FractalProvider::createGL()
44 {
45 ColorRGB_01* ptrColorTitre = new ColorRGB_01(0, 0, 0);
46 return new ImageFonctionel(create(), ptrColorTitre); // both ptr destroy by destructor of ImageFonctionel
47 }
48
49 /*--------------------------------------*\
50 |* Private *|
51 \*-------------------------------------*/
52
53 /*----------------------------------------------------------------------*\
54 |* End *|
55 \*---------------------------------------------------------------------*/