Elevation Shading [message #42241] |
Fri, 14 January 2005 08:32 |
Jim Harwell
Messages: 5 Registered: January 2005
|
Junior Member |
|
|
I am using Dave Fanning's code to shade a 3D elevation.
At present the elevations fade from:
BLUE through GREEN through RED through YELLOW
with the
HIGHEST value represented as YELLOW, the
LOWEST as BLUE and the
MIDPOINT as RED.
This always occurs regardless of the input values.
i.e. if max & min are 255 and 0 respectively, they will be represented
by yellow & blue respectively.
likewise, if max & min are 155 and 55 respectively, they will be
represented by yellow & blue respectively.
What I want is that the output color correlates directly with the input
value.
i.e. if max & min are 255 and 0 respectively, they will be represented
by yellow & blue respectively.
but if max & min are 155 and 55 respectively, they will be represented
by for instance red & green respectively.
There must be some kind of scaling/normalization going on but I can't
locate the code responsible - can anybody help me out/tell me where to
correct it?
This may be partly responsible:
thisSurface = OBJ_NEW('IDLgrSurface', data, x, y, $
Color=[255,255,255], _Extra=extra, Style=style, $
Shading=shading, Hidden_Lines=hidden_lines)
s = Size(data, /Dimensions)
thisSurface->SetProperty, Vert_Colors=Reform(BytScl(data, /NAN),
s[0]*s[1]), $
Palette=thisPalette
|
|
|