2075 5

CSC214 · 2075 · 5 marks

Trace the Bresenham’s Line drawing algorithm for the end points(1, 1) and (8, 5).

Trace the Bresenham’s Line drawing algorithm for the end points(1, 1) and (8, 5). [5]

Computer GraphicsChapter 2: Scan Conversion AlgorithmScan Converting a Point and a straight LineNumerical: Bresenham's line algorithm
  • Start point: $(x1, y1) = (1, 1)$ - End point: $(x2, y2) = (8, 5)$ $$\Delta x = x2 - x1 = 8 - 1 = 7$$ $$\Delta y = y2 - y1 = 5 - 1 = 4$$ Since $\Delta x \Delta y$, we step along the x-axis (increment x by 1 each step). Initial decision parameter: $$p0 = 2\Delta y - \Delta x = 2(4) - 7 = 8 - 7 = ...