comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Another fun question about color in IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Another fun question about color in IDL [message #17491 is a reply to message #17490] Thu, 21 October 1999 00:00 Go to previous messageGo to previous message
Mark Hadfield is currently offline  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
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: plot axis colors
Next Topic: idl

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 15:19:38 PDT 2025

Total time taken to generate the page: 1.19639 seconds