Re: Another fun question about color in IDL [message #17490] |
Thu, 21 October 1999 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Todd Bowers (tbowers@nrlssc.navy.mil ) writes:
> Well, I was just getting the hang of all this, then I
> started going to object graphics and now I'm confused
> again. I have some 2D data that I was surface'ing and
> shade_surf'ing with the z axis intensity colored by
> data value. Dandy.
>
> Then I decided to get cute when David Fanning pointed me to his
> xsurface object graphics procedure at
> http://www.dfanning.com/programs/xsurface.pro
> I thought, hmmmm, I'll just make his solid surface option which
> uses yellow by default and switch it to use my color shading
> instead, the equivalent of:
>
> colorData = zData
> shade_surf, zData, xData, yData, Ax=AX, Az=AZ, $
> shades=bytscl(colorData, top=!D.N_Colors-4, NaN=1), $
> XTitle=XTitle, YTitle=YTitle, ZTitle=ZTitle, charsize=charSize
>
> in my direct graphics code.
>
> Well, you can probably guess the rest. I can't get the RGB model
> it defaults to to handle colors the way I've been using them.
> Can anyone give me a nudge (or preferably a hard shove) in the
> right direction??
Yes, elevation shading in object graphics can be a bit
dicey. The trick is to turn shading ON and turn all
your lights OFF. The details can be found in this
article on my web page:
http://www.dfanning.com/tips/elevation_object.html
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|