-
Notifications
You must be signed in to change notification settings - Fork 0
/
colors.h
30 lines (24 loc) · 4.25 KB
/
colors.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once
// https://stackoverflow.com/questions/16500656/which-color-gradient-is-used-to-color-mandelbrot-in-wikipedia
// Interpolated using MATLAB's pchip function
namespace djl70
{
//const float paletteRed[64] = {
// 0.0000,0.0017,0.0066,0.0144,0.0247,0.0372,0.0516,0.0675,0.0846,0.1025,0.1210,0.1430,0.1754,0.2170,0.2663,0.3219,0.3823,0.4459,0.5112,0.5768,0.6411,0.7026,0.7600,0.8115,0.8559,0.8914,0.9168,0.9305,0.9390,0.9472,0.9548,0.9620,0.9687,0.9748,0.9804,0.9853,0.9896,0.9932,0.9960,0.9981,0.9995,1.0000,0.9883,0.9491,0.8869,0.8063,0.7119,0.6082,0.5000,0.3918,0.2881,0.1937,0.1131,0.0509,0.0117,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000
//};
//const float paletteGreen[64] = {
// 0.0275,0.0670,0.1062,0.1453,0.1841,0.2227,0.2610,0.2989,0.3366,0.3739,0.4108,0.4485,0.4893,0.5326,0.5777,0.6238,0.6703,0.7165,0.7615,0.8048,0.8455,0.8830,0.9166,0.9455,0.9690,0.9864,0.9969,1.0000,0.9967,0.9885,0.9758,0.9591,0.9389,0.9155,0.8894,0.8611,0.8311,0.7998,0.7676,0.7350,0.7025,0.6705,0.6346,0.5890,0.5354,0.4760,0.4128,0.3478,0.2831,0.2206,0.1625,0.1107,0.0673,0.0344,0.0139,0.0078,0.0079,0.0081,0.0086,0.0097,0.0113,0.0138,0.0172,0.0217
//};
//const float paletteBlue[64] = {
// 0.3922,0.4418,0.4907,0.5384,0.5843,0.6278,0.6685,0.7057,0.7389,0.7676,0.7912,0.8108,0.8299,0.8485,0.8666,0.8839,0.9005,0.9162,0.9309,0.9445,0.9568,0.9678,0.9774,0.9854,0.9918,0.9965,0.9992,0.9998,0.9824,0.9401,0.8770,0.7973,0.7051,0.6046,0.5000,0.3954,0.2949,0.2027,0.1230,0.0599,0.0176,0.0002,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0001,0.0090,0.0310,0.0641,0.1064,0.1562,0.2115,0.2705,0.3314
//};
const unsigned paletteRed[256] = {
0,0,0,0,0,1,1,1,2,2,3,3,4,4,5,6,6,7,8,9,9,10,11,12,13,14,15,16,17,18,19,20,22,23,24,25,26,27,28,30,31,32,33,35,36,38,40,42,45,47,50,52,55,58,61,65,68,71,75,78,82,86,90,94,97,101,106,110,114,118,122,126,130,135,139,143,147,151,155,159,163,167,171,175,179,183,187,190,194,197,201,204,207,210,213,216,218,221,223,225,227,229,231,232,234,235,236,237,237,238,238,239,239,240,241,241,242,242,243,243,243,244,244,245,245,246,246,247,247,247,248,248,249,249,249,250,250,250,251,251,251,252,252,252,252,253,253,253,253,253,254,254,254,254,254,254,255,255,255,255,255,255,255,255,255,255,254,253,252,250,248,245,242,239,235,231,226,221,216,211,206,200,194,188,182,175,169,162,155,148,141,134,128,121,114,107,100,93,86,80,73,67,61,55,49,44,39,34,29,24,20,16,13,10,7,5,3,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
};
const unsigned paletteGreen[256] = {
7,10,12,15,17,20,22,25,27,30,32,35,37,40,42,44,47,49,52,54,57,59,62,64,67,69,71,74,76,79,81,83,86,88,91,93,95,98,100,102,105,107,109,112,114,117,119,122,125,127,130,133,136,139,142,144,147,150,153,156,159,162,165,168,171,174,177,180,183,186,188,191,194,197,200,203,205,208,211,213,216,218,221,223,225,227,230,232,234,236,238,239,241,243,244,246,247,248,250,251,252,252,253,254,254,255,255,255,255,255,255,254,254,254,253,253,252,251,251,250,249,248,247,246,245,243,242,241,239,238,237,235,233,232,230,229,227,225,223,221,220,218,216,214,212,210,208,206,204,202,200,198,196,194,192,190,187,185,183,181,179,177,175,173,171,169,167,164,162,159,156,153,150,147,144,140,137,133,129,125,121,117,113,109,105,101,97,93,89,85,80,76,72,68,64,60,56,52,49,45,41,38,35,31,28,25,22,20,17,15,13,11,9,7,6,5,4,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,5,5,5,6,6,6,7
};
const unsigned paletteBlue[256] = {
100,103,106,110,113,116,119,122,125,128,131,134,137,140,143,146,149,152,155,157,160,163,165,168,170,173,175,178,180,182,184,186,188,190,192,194,196,197,199,200,202,203,204,206,207,208,209,210,212,213,214,215,216,218,219,220,221,222,223,224,225,226,228,229,230,231,232,233,234,235,236,236,237,238,239,240,241,242,242,243,244,245,245,246,247,247,248,249,249,250,250,251,251,252,252,253,253,253,254,254,254,254,255,255,255,255,255,255,255,254,254,252,251,248,246,243,240,236,232,228,224,219,214,209,203,198,192,186,180,174,167,161,154,148,141,134,128,121,114,107,101,94,88,81,75,69,63,57,52,46,41,36,31,27,23,19,15,12,9,7,4,3,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,5,6,8,10,12,14,16,19,21,24,27,30,33,37,40,43,47,50,54,58,61,65,69,73,77,81,84,88,92,96
};
}