   Color Scheme function
  I'm a beginner in OpenGL / C programming.For a program that we're modifying, we need to apply a 10-color schema that will do the following:a) determine what range a point/area is within a bell curveb) depending on the value of the point/area, apply a color Currently, I'm using the IF/ELSE IF approach (as shown in the snippet below).    The function works and it draws the bell curve in the designated colors.   However, instead of the IF / ELSE IF, we are supposed to use an array.The next line of code defines my array... and it compiles fine.float color [10][3]={{1.00, 0.00, 0.00},{1.00, 0.60, 0.01},{1.00, 1.00, 0.00},{0.60, 0.80, 0.00},{0.00, 0.50, 0.00},{0.60, 0.80, 1.00},{0.20, 0.40, 1.00},{0.80, 0.60, 1.00},{0.50, 0.00, 0.50},{0.50, 0.50, 0.50}};However, the next line of code throws a compile error.  I'm not sure as to how I should modify the line of code.   Any hints?glColor3FV(color[(int)(z*10.0/1.0)]);I believe the "z" may (or may not) be replaced with the >> normal(x, y) <<.   Again, I'm not sure though.Can anyone provide me some help on this?   Thanks,skydivetom*****************************************if (0.000 <= normal(x, y) <= 0.010)  glColor3f(1.00, 0.00, 0.00);else if (0.011 < normal(x, y) <= 0.020)   glColor3f(1.00, 0.60, 0.01);else if (0.021 < normal(x, y) <= 0.030)   glColor3f(1.00, 1.00, 0.00);else if (0.031 < normal(x, y) <= 0.040)   glColor3f(0.60, 0.80, 0.00);else if (0.041 < normal(x, y) <= 0.050)   glColor3f(0.00, 0.50, 0.00);else if (0.051 < normal(x, y) <= 0.060)   glColor3f(0.60, 0.80, 1.00);else if (0.061 < normal(x, y) <= 0.070)   glColor3f(0.20, 0.40, 1.00);else if (0.071 < normal(x, y) <= 0.080)   glColor3f(0.80, 0.60, 1.00);else if (0.081 < normal(x, y) <= 0.090)   glColor3f(0.50, 0.00, 0.50);else if (0.091 < normal(x, y) <= 1.000)   glColor3f(0.50, 0.50, 0.50);   
  glColor3f is named that way because it takes 3 floats as arguments. Not an array of three floats, but three separate values, each of which is a float.The code that you show uses glColor3f, but what you want to use - in order to pass a pointer to a "row" of your array - is glColor3fv, as the main part of your post suggests.;  Thanks!   