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

Home » Public Forums » archive » REPEAT BEGIN turns into & END... why?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
REPEAT BEGIN turns into & END... why? [message #12529] Fri, 21 August 1998 00:00 Go to previous message
clovis21 is currently offline  clovis21
Messages: 4
Registered: February 1998
Junior Member
Hello,

I'm trying to write an interactive version of the procedure in David
Fannning's book that makes an iso-surface of a head (p. 125)

Anyway...

The compiler insist on reading my REPEAT BEGIN statement as an & END
statement.

Why?

the script is attached. I know it won't work yet, as the value returned from
the histogram isn't the right one, but that's a minor problem at the moment)

Chris





window, 1, xsize=400, ysize=400

head=loaddata(8)
s=size(head)
xs=s(1)-1
ys=s(2)-1
zs=s(3)-1
topcolor=!d.n_colors-1

histwindow=!d.window

Plot, Histogram(head), Max_Value=5000

window, 2, xsize=400, ysize=400
Empty

headwindow=!d.window

Shade_Volume, head, 50, vertices, polygons, /Low
Scale3, XRange=[0,xs], YRange=[0,ys], ZRange=[0,zs]
isosurface = PolyShade(vertices, polygons, /T3D)
LoadCT, 0, NColors=topColor+1
TV, isosurface

!Mouse.Button = 0

; get to right window

wset, histwindow

;create pixmap window and enter it

window, 3, /pixmap, xsize=400, ysize=400
tv, bytscl(histogram(head), top=topcolor-1)

pixwindow=!d.window

; return to the histogram

wset, histwindow

; Get initial cursor location. Draw cross-hair.

Cursor, col, row, /Device, /Down
PlotS, [col,col], [0,400], /Device, Color=topColor
print, col

; Loop.

REPEAT BEGIN

; Get new cursor location.

Cursor, colnew, rownew, /change, /Device

IF !mouse.button eq 1 then BEGIN

; Erase old cross-hair.

device, copy=[0,0,400,400,0,0,pixwindow]

; Draw new cross-hair.
print, col

col = colnew
row = rownew

ENDIF

IF !mouse.button eq 2 then BEGIN

; update head

;temporarily disabled
;wset, headwindow
;
;
;Shade_Volume, head, col, vertices, polygons, /Low
;isosurface = PolyShade(vertices, polygons, /T3D)
;TV, isosurface
;
;
;wset, histwindow

ENDIF

REP UNTIL !Mouse.Button eq 4

;Erase the final cross-hair.

wset, histwindow
device, copy=[0,0,400,400,0,0,pixwindow]

END

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Porting IDL
Next Topic: Colors Common Block?

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

Current Time: Fri Oct 10 12:04:23 PDT 2025

Total time taken to generate the page: 1.04019 seconds