4 #include "CalibreurF.h"
5 #include "ColorTools.h"
8 /*----------------------------------------------------------------------*\
10 \*---------------------------------------------------------------------*/
12 /*--------------------------------------*\
14 \*-------------------------------------*/
17 * Dans un header only pour preparer la version cuda
21 /*--------------------------------------*\
23 \*-------------------------------------*/
28 * calibreurColor : transformation affine entre [-1,1] (l'output de f(x,y)) et [0,1] (le spectre hsb)
31 calibreur(IntervalF(-1, 1), IntervalF(0, 1))
36 virtual ~DamierMath(void)
41 /*--------------------------------------*\
43 \*-------------------------------------*/
47 void colorXY(uchar4
* ptrColor
, double x
, double y
, const DomaineMath
& domaineMath
, double t
)
51 calibreur
.calibrer(z
);
54 ColorTools::HSB_TO_RVB(hue01
, ptrColor
); // update color
56 ptrColor
->w
= 255; // opaque
61 double f(double x
, double y
, double t
)
63 return sin(x
* n
+ t
) * cos(y
* n
+ t
); // t para animation
66 /*--------------------------------------*\
68 \*-------------------------------------*/
83 /*----------------------------------------------------------------------*\
85 \*---------------------------------------------------------------------*/