final midpoint line drawing algorithm with radial line tests