However, the colour functions take only one argument, and nothing more. But if we want to retain the pm3d colouring and apply phong at the same time, we have a bit of a problem here, because all of a sudden, the colour of a point on the surface will depend on two quantities: the value if z(x,y), and the value of f(x,y,z), which is our Gaussian function. This worked very well for a single colour, because in that case, we simply fixed the red function at 1, and changed the value of the green and blue components according to the value of the Gaussian. So far, so good, but how do we turn all this into a phong on a general surface? If you recall from the post on phonged surfaces, what we did was to make the colour whiter when the value of the Gaussian function was high, and redder, when it was small. These three functions are shown in the previous figure. So, with these in mind, the default pm3d colouring scheme is sqrt(gray) for red, x^3 for green and sin(360x) for blue. * thus the ranges in `set pm3d rgbformulae' are -36.36 * negative numbers mean inverted=negative colour component But then, how on Earth does one figure out which function to use? Well, the easy solution is to issue (This is the default, so you actually haven't got to invoke this command.), you assign function 7 to red(gray), function 5 to green(gray) and function 15 to blue(gray). Using this value, which is called gray, the three components of the colour palette are calculated through three functions, red(gray), green(gray) and blue(gray). When invoking pm3d, first, the colour range (cbrange) is calculated (or specified), and then, using the colour range, all values of the function z(x,y) are mapped to the interval. ![]() color printable on gray (black-blue-violet-yellow-white)ģ3,13,10. ![]() ocean (green-blue-white) try also all other permutationsĢ1,22,23. ![]() traditional pm3d (black-blue-red-yellow)Ģ3,28,3. You will be presented with cryptic messages, likeħ,5,15. If you dig a bit deeper, e.g., by issuing the help command
0 Comments
Leave a Reply. |