Bresenham's Line drawing  and Circle drawing algorithm using midpoint