1 #ifndef FRACTAL_MATH_H_
2 #define FRACTAL_MATH_H_
6 #include "CalibreurF.h"
7 #include "ColorTools.h"
9 /*----------------------------------------------------------------------*\
11 \*---------------------------------------------------------------------*/
13 /*--------------------------------------*\
15 \*-------------------------------------*/
20 /*--------------------------------------*\
22 \*-------------------------------------*/
28 : n(n
), calibreur(IntervalF(-1, 1), IntervalF(0, 1))
32 /*--------------------------------------*\
34 \*-------------------------------------*/
42 void colorXY(uchar4
* ptrColor
, float x
, float y
, float t
)
46 calibreur
.calibrer(z
);
49 ColorTools::HSB_TO_RVB(hue01
, ptrColor
); // update color
51 ptrColor
->w
= 255; // opaque
56 float f(float x
, float y
,float t
)
58 return sin(x
* n
+ t
) * cos(y
* n
+ t
);
62 /*--------------------------------------*\
64 \*-------------------------------------*/
76 /*----------------------------------------------------------------------*\
78 \*---------------------------------------------------------------------*/