Re: Another fun question about color in IDL [message #17491 is a reply to message #17490] |
Thu, 21 October 1999 00:00   |
Mark Hadfield
Messages: 783 Registered: May 1995
|
Senior Member |
|
|
Todd Bowers <tbowers@nrlssc.navy.mil> wrote in message
news:7ula30$r0d$1@ra.nrl.navy.mil...
> Well, I was just getting the hang of all this, then I
> started going to object graphics and now I'm confused
> again.
It will pass--shouldn't last more than a year or two.
> ...I have some 2D data that I was surface'ing and
> shade_surf'ing with the z axis intensity colored by
> data value
> ...
> 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
> Well, you can probably guess the rest. I can't get the RGB model
> it defaults to handle colors the way I've been using them. It
> seemed simple enough, scan his code for the surface creation call:
>
> thisSurface = OBJ_NEW('IDLgrSurface', data, x, y, $
> Color=[255,255,0], _Extra=extra)
>
> and tweak it with the SHADE_RANGE keyword which I thought would be
> analagous to the SHADES keyword in shade_surf. No luck.
SHADE_RANGE has an effect only when the destination device uses indexed
colour. Assuming you have an RGB destination device (and I can't see why you
would) you need to use VERT_COLORS. Set it to an [n] or [3,n] byte array
where n is the number of vertices in the surface.
---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield/
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand
|
|
|