7 /*----------------------------------------------------------------------*\
9 \*---------------------------------------------------------------------*/
11 /*--------------------------------------*\
13 \*-------------------------------------*/
16 * Dans un header only pour preparer la version cuda
21 /*--------------------------------------*\
23 \*-------------------------------------*/
27 VagueMath(unsigned int w
, unsigned int h
)
29 this->factor
= 4 * PI
/ (float) w
;
32 virtual ~VagueMath(void)
37 /*--------------------------------------*\
39 \*-------------------------------------*/
50 void colorIJ(uchar4
* ptrColorIJ
, int i
, int j
, int t
)
52 unsigned char levelGris
;
54 f(levelGris
,i
, j
, t
); // update levelGris
56 ptrColorIJ
->x
= levelGris
;
57 ptrColorIJ
->y
= levelGris
;
58 ptrColorIJ
->z
= levelGris
;
60 ptrColorIJ
->w
= 255; // opaque
65 void f( unsigned char& levelGris
,int i
, int j
, float t
)
68 // levelGris = 255 * fabs(sin(t)); // same color for all the image (Hello image)
71 levelGris
= 255 * fabs(sin(i
* factor
+ t
));
74 /*--------------------------------------*\
76 \*-------------------------------------*/
87 /*----------------------------------------------------------------------*\
89 /*----------------------------------------------------------------------*/