Really, there's been decades of research into graphic algorithms -- all you have to do is google for them.
try these for a start:- Line drawing algorithm Line drawing algorithm or Bresenham's_line_algorithm
Bresenham's is good and simple to implement.
In reply to Re: Drawing lines and circles
by RichardK
in thread Drawing lines and circles
by studymonkperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |