Mail Archives: djgpp/1997/02/06/13:08:24
Adrian Smith (ams94 AT ecs DOT soton DOT ac DOT uk) wrote:
: Hi, I think if you use Bresenham's algorithm, or the midpoint algorithm (which
: are similar), you should be able to do it. That can certainly draw straight
: lines and circles.
What exactly do you refer to with "Bresenham's algorithm"? There are
things called the Bresenham line algorithm and the Bresenham circle
algorithm, which are used to draw lines and circles, respectively.
These are rather ingeniously derived algorithms which only use integer
addition and multiplication by constants, so they are fast and easy to
program. However, these can *only* draw lines and circles, and so are
improper answer to question of drawing ellipses. (I could post info
about how to derive these algorithms, if anyone is interested.)
--
Esa Peuha
student of mathematics at the University of Helsinki
http://www.helsinki.fi/~peuha/
- Raw text -