cn@allgfx.agi.oz (Con Neri) (02/21/90)
Does anybody know of an algorithm that can be used to derive the endpoints of a line in a raster given the rendered points? The accuracy I wish to work to is 1/2 a pixel. ie. Given 0 1 2 3 4 5 6 7 8 9 0| | | | | | | | | | | | | | | | | | | | | | | | | |X|X|X| | | | | | | | | | | |X|X|X| | | | | | | | | | | |X|X|X| | | | | | | | | | | | | | | | the endpoints would be: (1,2.5) (5,5.5) AND 0 1 2 3 4 5 6 7 8 9 | | | | | | | | | | | | | | | | | | | | | | | | | |X| | | |X| | | | | | | | |X| | |X| | | | | | | | | |X| |X| | | | | | | | | | |X|X| | | | | | | | | | | |X| | | | | | | | | | | | | | | | | | would produce: (1,2.5) (6,7.5) (6,2) Any help or giudance in how to approach this problem would be much appreciated. If you have any suggestions can you please e-mail rather than posting because sometimes the gremlins eat up the news en route to OZ. Thanks in advance. CON NERI All Graphic R+D e-mail: cn@allgfx.agi.oz.au 73 Whiteman ST tele: +61-3-6966401 South Melbourne tele: +61-3-6464333 Vic 3205 tele: +61-3-6906788 AUSTRALIA