Re: Drawing a line - point by point
From: Martin Harvey (Demon Account) (martin_at__nospam_pergolesi.demon.co.uk)
Date: 02/27/04
- Previous message: Lamp: "Re: Inserting images in a stringgrid"
- In reply to: Roy: "Drawing a line - point by point"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 26 Feb 2004 23:09:55 +0000
On Thu, 19 Feb 2004 15:56:17 -0000, "Roy" <roy@mechnet.liv.ac.uk>
wrote:
>Hi,
> I used to have an algorithm for drawing a line pixel by pixel but a
>lengthy search has yielded nothing.
Alas, Alas, you've probably not been searching for the right thing. By
far and away the fastest alogirhtm is the Bresenham line drawing
algorithm. which works great for lines with integer start and end
points. A moore general algorithm, which can be used for more complex
curves is the midpoint algorithm.
Try:
try putting: "line drawing algorithm" into google. The very first
match I get is:
http://www.cs.helsinki.fi/group/goa/mallinnus/lines/bresenh.html
which describes the bresenham alogirhtm.
MH.
- Previous message: Lamp: "Re: Inserting images in a stringgrid"
- In reply to: Roy: "Drawing a line - point by point"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|