26 #include <boost/property_tree/ptree.hpp>
41 const double c0 = (cell->GetChemicals().size() > m_index) ? cell->GetChemical(m_index) : 0.0;
42 const double conc = max(c0, 0.0) / cell->
GetArea();
48 const double x = log10(conc);
50 const double x_white = -5.0;
51 const double x_cyan = -4.5;
52 const double x_teal = -4.0;
53 const double x_navy = -3.0;
59 else if (x < x_cyan) {
60 t_color = interpolate(x, white, x_white, cyan, x_cyan);
62 else if (x < x_teal) {
63 t_color = interpolate(x, cyan, x_cyan, teal, x_teal);
65 else if (x < x_navy) {
66 t_color = interpolate(x, teal, x_teal, navy, x_navy);
72 return Hsv2Rgb(get<0>(t_color), get<1>(t_color), get<2>(t_color));
A cell contains walls and nodes.
Namespace for components of the Default model group.
Header file for HSV colors.
Namespace for color utilities.
Rgb color def to Hsv color def: r,g,b values are from 0 to 1 and h = [0,360], s = [0...
ChemBlue(const boost::property_tree::ptree &pt, unsigned int index)
Straight initialization.
double GetArea() const
Return the area of the cell.
std::array< double, 3 > operator()(SimPT_Sim::Cell *cell)
Return color value.