Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!pmafire!mica.inel.gov!sapphire!highley From: highley@sapphire.idbsu.edu (Larry Highley) Newsgroups: comp.lang.pascal Subject: R:Dewdney Algorithm for Cat Scanners Summary: Need Help in Deciphering it Message-ID: <1991Mar22.185337.23539@sapphire.idbsu.edu> Date: 22 Mar 91 18:53:37 GMT References: <1991Mar20.150624.27636@javelin.es.com> <1991Mar21.101704.8161@uwasa.fi> Organization: Boise State University, Boise Lines: 32 In Scientific American (September 1990) there is an article by A.K. Dewdney on Mathematical Recreations. It involves the use of Digital X rays or D rays as he calls them. He goes on to give an algorithm for writing a program which is capable of scanning simple images from a set of D--rays which are both horizontal and vertical. He also mentions Diagonal D-rays. I was wondering if anyone had actually written the program and if so if I could have a look at it. I would also be interested in any help people can give since I'm relatively new to this. Here is the algorith he provides. input x-array and y-array input xcount and ycount repeat done<--0 for each array position I if x-array(I)=ycount and done=0 then x-array(I)<--0 for each y-array(J)>0 decrement y-array(J) color square at (I,J) done<--1 if y-array(I)<--0 for each x-array(J)>0 decrement x-array(J) color square at (J,I) done<--1 compute new xcount and ycount until count =0 I could use any help possible. Thanks!!:)