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

Home » Public Forums » archive » Re: shading/outlining on surface plot
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: shading/outlining on surface plot [message #82751] Fri, 18 January 2013 11:51 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Bob Plano writes:

> I suppose I could do something like this with a plots command, but I
> was thinking surface might save me the trouble of having to make
> arrays with all the corner points specified. Thanks, Chris. I read
> your paper on wavelets about once a week because I keep forgetting
> what little I know about them.

I don't think what you are doing is going to work. Here is something
like what you have in mind, I guess. But, the result is not particularly
pleasing to me, although the points on the surface ARE outlined!

;*******************************************************
peak = cgdemodata(2)
dims = Size(peak, /Dimensions)
markedData = Round(Randomu(-5L, 50) * (41*41))
cgLoadCT, 0, /Brewer, /Reverse
markedImage = BytScl(peak)

thisDevice = !D.Name
Set_Plot, 'Z'
Device, Set_Resolution=[dims[0]*5, dims[1]*5], Z_BUFFER=0
cgLoadCT, 0, /Brewer, /Reverse
cgImage, markedImage, XRANGE=[0,dims[0]], YRANGE=[0,dims[1]], NoErase=1
FOR j=0,N_Elements(markedData)-1 DO BEGIN
m = markedData[j]
xy = Array_Indices(dims, m, /DIMENSIONS)
x = xy[0]
y = xy[1]
cgPlotS, [x, x, x+1, x+1, x], [y, y+1, y+1, y, y]
ENDFOR
markedImage = TVRD()
Set_Plot, thisDevice

cgSurface, peak, texture_image=markedimage
END
;*******************************************************

You can see the results here:

http://www.idlcoyote.com/misc/marked_image_2.png

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Destroying objects
Next Topic: CgWindow and multiple plots

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

Current Time: Fri Oct 10 03:05:16 PDT 2025

Total time taken to generate the page: 0.32047 seconds