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

Home » Public Forums » archive » Re: Z-Buffer Prize Winners!
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: Z-Buffer Prize Winners! [message #8163] Thu, 13 February 1997 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
George Sigut, our grand prize winner, writes:

> Just so that David and everybody else doesn't think that the Swiss
> do not wash their necks or something, here is a nicer version of the
> code (the result is as ugly as before)

[ really nice code deleted]

Oh, so much nicer, George! I can even read this without looking
for my spectacles. :-)

And I did see a comment in there! Code this nice, it probably
just jumped in there in spite of itself!

I really appreciate these contributions. Thanks.

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
2642 Bradbury Court, Fort Collins, CO 80521
Phone: 970-221-0438 Fax: 970-221-4762
E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
-----------------------------------------------------------
Re: Z-Buffer Prize Winners! [message #8165 is a reply to message #8163] Thu, 13 February 1997 00:00 Go to previous message
sigut is currently offline  sigut
Messages: 12
Registered: February 1994
Junior Member
In article <davidf-ya023080001202971148240001@news.frii.com>
davidf@dfanning.com (David Fanning) writes:

> ... My only
> problem with George is that he writes really ugly IDL code,
> but I'm not going to hold that against him. :-)

Just so that David and everybody else doesn't think that the Swiss
do not wash their necks or something, here is a nicer version of the
code (the result is as ugly as before)

-----------------------------------------------------------
zmt = dist(21)/max(dist(21)) * 1.3
zm1 = - zmt + 1.3
zm2 = fltarr(21,21) + .65

pos1 = [.1,.55,.9,.9] ; top picture
pos2 = [.1,.1,.9,.45] ; bottom picture

!z.range = [0,1.3]
!p.charsize = 2.25

dev = !D
set_plot, 'Z'
device, set_character_size=[dev.x_ch_size,dev.y_ch_size]
ratio = float(!d.y_size)/!d.x_size
!P.BACKGROUND = !D.N_COLORS - 1 ; to get white background

!x.style = 4 & !y.style = 4 & !z.style = 4

!p.position = pos1
shade_surf, zmt, shades=bytscl(zmt,TOP=!d.table_size), az=20, /SAVE
shade_surf, zm1, shades=zm1*0B+!d.table_size/3, /T3D, /NOERASE
shade_surf, zm2, shades=zmt*0B+!d.table_size/4, /T3D, /NOERASE
tr1 = !p.t

!p.position = pos2
shade_surf, zmt, shades=bytscl(zmt,TOP=!d.table_size), az=20, /SAVE, /NOERASE
shade_surf, zm1, shades=zm1*0B+!d.table_size/3, /T3D, /NOERASE
shade_surf, zm2, shades=zmt*0B+!d.table_size/4, /T3D, /NOERASE
tr2 = !p.t

a = tvrd()

set_plot, 'PS'
device, BITS=8, xsize=7, ysize=7*ratio, xoffset=1, yoffset=1, /inches

tv,a

!x.style = 0 & !y.style = 0 & !z.style = 0

!p.position = pos1
!p.t = tr1
shade_surf, zmt, /T3D, /NOERASE, /NODATA, $
TITLE='Ritchey-Chretian Optimization', $
XTITLE='e!d1', YTITLE='e!d2', ZTITLE='Normalized Merit'

!p.position = pos2
!p.t = tr2
shade_surf, zmt, /T3D, /NOERASE, /NODATA, $
TITLE='Ritchey-Chretian Optimization', $
XTITLE='e!d1', YTITLE='e!d2', ZTITLE='Normalized Merit'

device, /close

set_plot, 'X'
-----------------------------------------------------------

...yes I know, there are no comments in the code. :-b

George
--
------------------------------------------------------------ ------------------
George M.Sigut, ETH Informatikdienste, Anwenderunterstuetzung, CH-8092 Zurich
Swiss Federal Institute of Technology, Computing Services, User Support
email: sigut@awu.id.ethz.ch Phone: +41 1 632 5763 Fax: +41 1 632 1312
>>>>>>>>> in case of email problems send the mail to "sigut@acm.org" <<<<<<<<<
------------------------------------------------------------ ------------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Internet IDL script
Next Topic: analysis of spectra

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

Current Time: Sat Oct 11 07:43:39 PDT 2025

Total time taken to generate the page: 0.33918 seconds