Mid-Point Circle Drawing Algorithm

Mid-Point Circle Drawing algorithm is based on determining subsequent points for drawing a circle.This algorithm also uses the concept of symmetry between octants of a circle. So, we need to use this algorithm on one octant only.Corresponding points in other octants can be plotted using concept of symmetry between octants. #include<stdio.h> #include<conio.h> /*Header file for […]

Continue reading


DDA Line Drawing Algorithm

DDA(Digital DIfferential Analyzer) is a simple line drawing algorithm.It is based on calculating the difference between x and y coordinates of two points and determining which of the two directions need more steps. #include<stdio.h> #include<conio.h> /*Header file for built-in graphics functions such as plot() and initgraph()*/ #include<graphics.h> #include<math.h> int round(float val) { return (int)(val+0.5); } […]

Continue reading


Bresenham’s Line Drawing Algorithm

The Bresenham algorithm is a basic line drawing algorithm. It uses only integer calculations. At every step,we move one unit in x direction and choose among two candidate points in y direction. #include<stdio.h> #include<conio.h> /*Header file for built-in graphics functions such as plot() and initgraph()*/ #include<graphics.h> /* Function To Implement Bresenham’s algorithm */ void line_bresenham(int […]

Continue reading