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

Home » Public Forums » archive » Re: Object Surface Shaded by Elevation (LONG)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Object Surface Shaded by Elevation (LONG) [message #13305] Mon, 02 November 1998 00:00
Struan Gray is currently offline  Struan Gray
Messages: 178
Registered: December 1995
Senior Member
David Fanning, davidf@dfanning.com writes:

>> **You can add a palette to a surface object.**
>> No doubt RSI will break this in 5.2 since I use it so much.
>
> Still works in my version of IDl 5.2. :-)

That's good to hear.

I'm not sure if I just made a lucky guess or if palettes are meant
to be more widespread in object graphics. The relevant part of the
manuals is, um, vague. It states several times that palettes can be
added to models *and* graphics atoms but nowhere documents how to use
a palette with an atom. I've done a fair amount of testing with
IDLgrSurface objects and it seems to work just as you would expect
(and saves fair bit of memory when you plot large arrays). I don't
know if the same trick works with polygons and polylines, but it's
easy enough to try.


Struan
Re: Object Surface Shaded by Elevation (LONG) [message #13311 is a reply to message #13305] Mon, 02 November 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Struan Gray (struan.gray@sljus.lu.se) writes:

> WARNING: useful but undocumented feature follows
>
> **You can add a palette to a surface object.**
> No doubt RSI will break this in 5.2 since I use it so much.

Still works in my version of IDl 5.2. :-)

Thanks for this useful information, Struan.

Cheers,

David

----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Object Surface Shaded by Elevation (LONG) [message #13312 is a reply to message #13305] Mon, 02 November 1998 00:00 Go to previous message
Struan Gray is currently offline  Struan Gray
Messages: 178
Registered: December 1995
Senior Member
David Fanning, davidf@dfanning.com writes:

WARNING: useful but undocumented feature follows

**You can add a palette to a surface object.**

Try replacing this line in David's program:


> thisWindow->SetProperty, Palette=thisPalette

With all of the following:


thisSurface->SetProperty, Palette=thisPalette

thisSurface2 = OBJ_NEW('IDLgrSurface', data/2, x, y, Style=style, $
Shading=0, Vert_Colors=Reform(BytScl(data), numVerts))
thisPalette2=Obj_New('IDLgrPalette')
thisPalette2->LoadCT, 0
thisSurface2 -> SetProperty, palette=thispalette2
thisSurface2->GetProperty,XRange=xrange,YRange=yrange,ZRange=zrange
xs = Normalize(xrange, Position=[-0.5,0.5])
ys = Normalize(yrange, Position=[-0.5,0.5])
zs = Normalize(zrange, Position=[-0.2,0.2])
thisSurface2->SetProperty,XCoord_Conv=xs, YCoord_Conv=ys, ZCoord_Conv=zs
thisModel->Add, thisSurface2


No doubt RSI will break this in 5.2 since I use it so much.


Struan
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: HDF Data sets containg strings?
Next Topic: IDL 5.2 Reviews

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

Current Time: Wed Oct 08 19:14:54 PDT 2025

Total time taken to generate the page: 0.00394 seconds