X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f996b,3593bb8d44704245,start X-Google-Attributes: gidf996b,public X-Google-Thread: 110f55,3593bb8d44704245,start X-Google-Attributes: gid110f55,public X-Google-Thread: fbb9d,3593bb8d44704245,start X-Google-Attributes: gidfbb9d,public X-Google-ArrivalTime: 1994-06-07 17:24:53 PST Path: nntp.gmd.de!Germany.EU.net!EU.net!howland.reston.ans.net!swrinde!gatech!news-feed-1.peachnet.edu!news.duke.edu!solaris.cc.vt.edu!news.ans.net!mailhost.interaccess.com!boba From: jones@pyrite.cs.uiowa.edu (Douglas W. Jones,201H MLH,3193350740,3193382879) Newsgroups: rec.arts.ascii,alt.ascii-art,alt.binaries.pictures.ascii Subject: LINE - Hilbert curves Date: 7 Jun 1994 21:11:24 GMT Organization: IAC Lines: 99 Approved: boba@gagme.wwa.com Message-ID: <2t2slh$mtc@mailhost.interaccess.com> NNTP-Posting-Host: psycfrnd.interaccess.com Originator: boba@psycfrnd.interaccess.com Xref: nntp.gmd.de rec.arts.ascii:22 alt.ascii-art:11284 I wrote an image processing program some time ago to explore the effect of replacing raster scanning with Hilbert curve scanning, and a side effect of this work was a little program that generates hilbert curves: % filltest 2 2 ._. ._! % % filltest 4 4 . ._._. !_! ._! ._. !_. ! !_._! % % filltest 8 8 ._. ._._. ._._. ._! !_. !_! ._! ! ._. ! ._. !_. !_! !_! ! !_._! ._. ._. ! ._._. ! !_! ! !_! ._! !_. ._! ._. !_. ._! !_._! !_._! % % filltest 16 16 . ._._. ._._. ._._. ._._. ._._. !_! ._! !_. !_! ._! !_. !_! ._! ._. !_. ._! ._. ! ._. ! ._. !_. ! !_._! !_._! ! !_! !_! ! !_._! !_. ._._._. ._! ._. ._. ! ._._. ._! !_. ._! !_. ! !_! ! !_! ._! ! ._. ! ! ._. ! !_. ._! ._. !_. !_! !_! !_! !_! ._! !_._! !_._! ._. ._. ._. ._. !_. ._._. ._._. ! !_! ! ! !_! ! ._! !_. !_! ._! !_. ._! !_. ._! ! ._. ! ._. !_. ._! !_._._! !_. !_! !_! ! !_._! ! ._._. ._._. ! ._. ._. ! ._._. !_! ._! !_. !_! ! !_! ! !_! ._! ._. !_. ._! ._. !_. ._! ._. !_. ! !_._! !_._! !_._! !_._! !_._! % % filltest 32 32 ._. ._._. ._._. ._._. ._._. ._._. ._._. ._._. ._._. ._._. ._._. ._! !_. !_! ._! !_. !_! ._! !_. !_! ._! !_. !_! ._! !_. !_! ._! ! ._. ! ._. !_. ._! ._. ! ._. ! ._. !_. ._! ._. ! ._. ! ._. !_. !_! !_! ! !_._! !_._! ! !_! !_! ! !_._! !_._! ! !_! !_! ! !_._! ._. ._. ! ._._. ._._. ! ._. ._. !_. ._._._. ._! ._. ._. ! ._._. ! !_! ! !_! ._! !_. !_! ! !_! ! ._! !_. ._! !_. ! !_! ! !_! ._! !_. ._! ._. !_. ._! ._. !_. ._! ! ._. ! ! ._. ! !_. ._! ._. !_. ._! !_._! !_._! !_._! !_._! !_. !_! !_! !_! !_! ._! !_._! !_._! ! ._._. ._._. ._. ._._. ._._. ! ._. ._. ._. ._. !_. ._._. ._._. !_! ._! !_. !_! !_! ._! !_. !_! ! !_! ! ! !_! ! ._! !_. !_! ._! ._. !_. ._! ._. ._. !_. ._! ._. !_. ._! !_. ._! ! ._. ! ._. !_. ! !_._! !_._! ! ! !_._! !_._! ! ._! !_._._! !_. !_! !_! ! !_._! !_. ._._._. ._! !_. ._._._. ._! ! ._._. ._._. ! ._. ._. ! ._._. ._! !_. ._! !_. ._! !_. ._! !_. !_! ._! !_. !_! ! !_! ! !_! ._! ! ._. ! ! ._. ! ! ._. ! ! ._. ! ._. !_. ._! ._. !_. ._! ._. !_. !_! !_! !_! !_! !_! !_! !_! !_! ! !_._! !_._! !_._! !_._! !_._! ._. ._. ._. ._. ._. ._. ._. ._. ! ._._. ._._. ._._. ._._. ._._. ! !_! ! ! !_! ! ! !_! ! ! !_! ! !_! ._! !_. !_! ._! !_. !_! ._! !_. ._! !_. ._! !_. ._! !_. ._! ._. !_. ._! ._. ! ._. ! ._. !_. ._! !_._._! !_. ._! !_._._! !_. ! !_._! !_._! ! !_! !_! ! !_._! ! ._._. ._._. ! ! ._._. ._._. ! !_. ._._._. ._! ._. ._. ! ._._. !_! ._! !_. !_! !_! ._! !_. !_! ._! !_. ._! !_. ! !_! ! !_! ._! ._. !_. ._! ._. ._. !_. ._! ._. ! ._. ! ! ._. ! !_. ._! ._. !_. ! !_._! !_._! !_! !_._! !_._! ! !_! !_! !_! !_! ._! !_._! !_._! !_. ._._. ._._. ._._. ._._. ._! ._. ._. ._. ._. !_. ._._. ._._. ._! !_. !_! ._! !_. !_! ._! !_. ! !_! ! ! !_! ! ._! !_. !_! ._! ! ._. ! ._. !_. ._! ._. ! ._. ! !_. ._! !_. ._! ! ._. ! ._. !_. !_! !_! ! !_._! !_._! ! !_! !_! ._! !_._._! !_. !_! !_! ! !_._! ._. ._. ! ._._. ._._. ! ._. ._. ! ._._. ._._. ! ._. ._. ! ._._. ! !_! ! !_! ._! !_. !_! ! !_! ! !_! ._! !_. !_! ! !_! ! !_! ._! !_. ._! ._. !_. ._! ._. !_. ._! ._. !_. ._! ._. !_. ._! ._. !_. ._! !_._! !_._! !_._! !_._! !_._! !_._! !_._! !_._! !_._! !_._! % % filltest 19 9 ._. ._._. ._._. ._._. ._._. ._._. ._. ._! !_. !_! ._! !_. !_! ._! !_. !_! ! ! ._. ! ._. !_. ._! ._. ! ._. ! ._. ! !_! !_! ! !_._! !_._! ! !_! !_! ! !_! ._. ._. ! ._._. ._._. ! ._. ._. !_. . ! !_! ! !_! ._! !_. !_! ! !_! ! ._! ! !_. ._! ._. !_. ._! ._. !_. ._! ! ._. ._! !_._! !_._! !_._! !_._! !_. !_! ! !_._._._._._._._._._._._._._._! ._._. % The final example above shows that the program does some odd things when you ask it to fill a region that isn't a power-of-two square, but what it does, in that case, didn't matter in the least for my data compression application. Doug Jones jones@cs.uiowa.edu