Sabnock
Member
Looking for a good line drawing algorithm.
I want to be able to per pixel colour a line so i can animate colour along the length of the line which GML does seem to cover
i have looked on line and seen a few options but wanted to get advice on what was best for quick, efficient game use
options i have looked at are:
any help would be appreciated
I want to be able to per pixel colour a line so i can animate colour along the length of the line which GML does seem to cover
i have looked on line and seen a few options but wanted to get advice on what was best for quick, efficient game use
options i have looked at are:
- Digital Differential Analyzer (graphics algorithm) — Similar to the naive line-drawing algorithm, with minor variations.
- Bresenham's line algorithm — optimized to use only additions (i.e. no divisions or multiplications); it also avoids floating-point computations.
- Xiaolin Wu's line algorithm — can perform spatial anti-aliasing, appears "ropey" from brightness varying along the length of the line
any help would be appreciated