PRO findcent,img,x,y ;procedure to find the centre of a circular 256*256 image by plotting circles ;on the image displayed at 3 times normal size r=0. & x= 0. & y=0. ;set large window to view 3X image WINDOW,0,XSIZE=1000,YSIZE=800 ans='' REPEAT BEGIN PRINT,'Enter the radius, and the x and y coordinates of the circle' READ,r,x,y TVSCL,REBIN(img,256*3.,256*3.,/SAMPLE) ;plot the circle on the image arcs,r*3,0,360,x*3,y*3,/dev PRINT,'Do you want to reposition the circle?' READ,ans ENDREP UNTIL(STRLOWCASE(ans) EQ 'n') ; Return window to normal size WINDOW,0 RETURN END