Possible Solution
Original raster-scan algorithm
discontinuities at right and bottom boundaries