Newsgroups: comp.sys.sinclair
Path: ulke.hiMolde.no!trane.uninett.no!due.unit.no!nac.no!Norway.EU.net!EU.net!uknet!info!iialan
From: iialan@iifeak.swan.ac.uk (Alan Cox)
Subject: Re: BASIC line draw
X-Nntp-Posting-Host: iifeak.swan.ac.uk
Message-ID: <D9GFyp.9tH@info.swan.ac.uk>
Sender: news@info.swan.ac.uk
Organization: Institute For Industrial Information Technology
References: <3op102$dp9@celebrian.otago.ac.nz> <95052017375700088@vanilla.nbg.sub.org>
Date: Wed, 31 May 1995 18:13:37 GMT
Lines: 15

In article <95052017375700088@vanilla.nbg.sub.org> kio@vanilla.nbg.sub.org writes:
>the most common used approach is:
>- walk along x coordinate and step in y direction if abs(dx) > abs(dy)
>- walk along y coordinate and step in x direction if abs(dx) < abs(dy)

So slow. The fast way is to have a table of 8 by 8 blocks and just or in
the 8 byte block matching the entry/exit points of the line in that block
No bit ops needed 

Alan
-- 
  ..-----------,,----------------------------,,----------------------------,,
 // Alan Cox  //  iialan@www.linux.org.uk   //  GW4PTS@GB7SWN.#45.GBR.EU  //
 ``----------'`----------------------------'`----------------------------''
Redistribution of this message via the Microsoft Network is prohibited
