multi-surfaces on shade_surf [message #13238] |
Fri, 30 October 1998 00:00  |
lbryanNOSPAM
Messages: 21 Registered: July 1998
|
Junior Member |
|
|
Hello all,
I've been trying to plot 2 surfaces on the same shade_surf plot and
have not had success. My goal is to represent two (or more) surfaces
with no connections between surfaces. I can produce two surfaces
using David Fannings Scatter3d, but the resulting image is undesirably
pixelated. The shade_surf result is more aestetically pleasing for
one surface, but I haven't been able to get two surfaces to work
(I've been trying the noerase keyword). I'm probably missing
something obvious (as usual) and would appreciate a kick in the right
direction.
IDL> surf1 = dist(100)
IDL> surf2 = intarr(100,100)
IDL> surf2(*) = 100
IDL> shade_surf,surf1,zrange = [0,100]
IDL> shade_surf,surf2,/noerase,zrange = [0,100]
Thanks
Lisa Bryan
Arete Associates
Tucson, Arizona
lbryan@arete-az.com
|
|
|
Re: multi-surfaces on shade_surf [message #13240 is a reply to message #13238] |
Thu, 29 October 1998 00:00   |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Lisa Bryan (lbryan@arete-az.com) writes:
> I've been trying to plot 2 surfaces on the same shade_surf plot and
> have not had success. My goal is to represent two (or more) surfaces
> with no connections between surfaces. I can produce two surfaces
> using David Fannings Scatter3d, but the resulting image is undesirably
> pixelated. The shade_surf result is more aestetically pleasing for
> one surface, but I haven't been able to get two surfaces to work
> (I've been trying the noerase keyword). I'm probably missing
> something obvious (as usual) and would appreciate a kick in the right
> direction.
>
> IDL> surf1 = dist(100)
> IDL> surf2 = intarr(100,100)
> IDL> surf2(*) = 100
> IDL> shade_surf,surf1,zrange = [0,100]
> IDL> shade_surf,surf2,/noerase,zrange = [0,100]
I'm not quite sure I have the whole picture here. (To
tell you the truth, I don't even know what the Scatter3D
plot does.) But I *think* this has to be done in the
Z Graphics Buffer if you are going to be successful.
Here are a few modifications to your code. Is this more
what you have in mind?
thisDevice = !D.Name
Set_Plot, 'Z'
Device, Set_Resolution=[400,400]
surf1 = dist(100)
surf2 = intarr(100,100)
surf2(*) = 100
shade_surf,surf1,zrange = [0,100]
shade_surf,surf2,/noerase,zrange = [0,100]
snapshot = TVRD()
Set_Plot, thisDevice
Window, XSize=400, YSize=400
TV, snapshot
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/
Note: A copy of this article was e-mailed to the original poster.
|
|
|
Re: multi-surfaces on shade_surf [message #13313 is a reply to message #13238] |
Mon, 02 November 1998 00:00  |
Struan Gray
Messages: 178 Registered: December 1995
|
Senior Member |
|
|
In article <71d982$mpe$1@nnrp1.dejanews.com> ,
mirko_vukovic@notes.mrc.sony.com writes:
> Struan (Grey?) has an absolutely great write-up on
> plotting multiple surfaces. Sorry, but I don't
> have the www link to it anymore.
http://www.sljus.lu.se/stm/IDL/Surf_Tips/
Thanks for the plug. The tutorial is still only for direct
graphics, but I hope to update it reasonably soon to include some
object graphics too. These days I prefer to use object graphics
because of the consistent way it handles colour and because displaying
multiple surfaces with user-editable display styles is much, much
easier. That said, combining mesh and shaded/coloured plots to show
surface curvature is *still* tricky because of the limited number of
display styles for polygons in object graphics. Plus ca change...
Struan (Gray)
|
|
|