Color from wave - sqrt scale?
masheroz
I would like to have (in the first instance) black as the low value and white as the high value, where small changes in the value at low values give the greatest change in colour, following a sqrt curve.
I've read through the indexed color details section of the Image Plots in the manual, but can't get the surface to colour at all when I select "color from wave" in the surface properties.
What do I need to do?
Thanks
(1) Gizmo color waves for N colors have dimension (N,4). The first dimension is used to select the appropriate level, the next three are red, green, blue, and the last is alpha (color transparency, between 0 and 1).
(2) the r, g, b values range from 0.0 to 1.0, not 0 to 65535.
You should check this in the Gizmo reference help file. You will have to construct the r, g, b values to follow your desired square-root dependency over the range of values you want. See if this solves your problem. Your choice of a gray scale color table may require you to alter the Gizmo background color from its normal white.
That said, I tried implementing a test for the above. I edited the color table wave, and it looked OK. The Gizmo display was fine with built-in color scales. I applied the alpha blend function to the surface, and had checked the 'calculate normals' box in its interface window. However, with the custom color table the Gizmo surface was no longer visible, and I got an error message in the command line: "Gizmo error caught in surface fill". I don't know where this problem originates. I'm sure AG can figure it out.
IP 6.32
March 13, 2015 at 08:49 am - Permalink
It is difficult to guess what's going on without having access to an experiment. The error report in the history only indicates that somewhere in the drawing of a surface object some command was flagged as an error by the OpenGL driver.
As for the OP:
If you have a surface plot you can use
This will create a color wave for your surface based on a scalar srcWave (which should have the same dimension as your surface data). You can scale srcWave as you wish (sqrt or otherwise).
A.G.
WaveMetrics, Inc.
March 13, 2015 at 04:08 pm - Permalink
Is "level" defined in the Gizmo help?
If I can't get it to work, or get error messages, I'll post some data excerpts to see what you can make of it.
March 14, 2015 at 02:20 am - Permalink
I had my 2D surface.
I then created a color wave and made it a sqrt
surface_C = sqrt(surface_C) //this makes a sqrt grey scale colour wave
and then applied it to my surface.
It seems to work. (in fact I did a couple of sqrts to accentuate the colour.)
.
The first time I tried it, I got a bunch of the "Gizmo error caught in surface fill." errors, but when I started in a fresh experiment to try and reproduce it, it worked.
March 16, 2015 at 07:57 pm - Permalink