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

Home » Public Forums » archive » Re: Draped Contours?
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: Draped Contours? [message #68970] Thu, 10 December 2009 10:23 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Dec 10, 3:48 pm, mgalloy <mgal...@gmail.com> wrote:
> Like this?
>
> z = randomu(seed, 50, 50)
> for i = 0, 4 do z = smooth(z, 5, /edge_truncate)
>
> view = obj_new('IDLgrView')
>
> model = obj_new('IDLgrModel')
> view->add, model
>
> dem = obj_new('IDLgrSurface', z, style=2, color=[200, 200, 0],
> depth_offset=1)
> model->add, dem
>
> contours = obj_new('IDLgrContour', z, n_levels=15)
> model->add, contours
>
> lightModel = obj_new('IDLgrModel')
> view->add, lightModel
>
> light = obj_new('IDLgrLight', type=2, location=[-1, 1, 1])
> lightModel->add, light
>
> ambientLight = obj_new('IDLgrLight', type=0, intensity=0.4)
> lightModel->add, ambientLight
>
> dem->getProperty, xrange=xr, yrange=yr, zrange=zr
> xc = norm_coord(xr)
> xc[0] -= 0.5
> yc = norm_coord(yr)
> yc[0] -= 0.5
> zc = norm_coord(zr)
> zc[0] -= 0.5
> dem->setProperty, xcoord_conv=xc, ycoord_conv=yc, zcoord_conv=zc
> contours->setProperty, xcoord_conv=xc, ycoord_conv=yc, zcoord_conv=zc
>
> model->rotate, [1, 0, 0], -90
> model->rotate, [0, 1, 0], -30
> model->rotate, [1, 0, 0], 45
>
> clipboard = obj_new('IDLgrClipboard', dimensions=[400, 400])
> clipboard->draw, view, /postscript, /vector, filename='draped_surface.eps'
>
> win = obj_new('IDLgrWindow', dimensions=[400, 400], graphics_tree=view)
> win->draw
>
> end
>

A similar result could be obtained with

z = randomu(seed, 50, 50)
for i = 0, 4 do z = smooth(z, 5, /edge_truncate)
isurface,z
icontour,z,/over,planar=0,n_levels=15
isave,'draped_surface.eps'
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Reducing a set of curves to a mean curve
Next Topic: ITT VIS at the 90th AMS Annual Meeting

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

Current Time: Wed Oct 08 19:50:58 PDT 2025

Total time taken to generate the page: 0.00461 seconds