2081 5

CSC214 · 2081 · 5 marks

Plot the first octant of a circle centered at (-2, -2), having a radius of 5 units using the mid-point circle algorithm.

Plot the first octant of a circle centered at (-2, -2), having a radius of 5 units using the mid-point circle algorithm. [5]

Computer GraphicsChapter 2: Scan Conversion AlgorithmScan Converting Circle and EllipseNumerical: Midpoint circle algorithm
  • Center: $(xc, yc) = (-2, -2)$ - Radius: $r = 5$ Compute points relative to origin starting at $(0, r)$, then translate by adding $(xc, yc)$. First octant runs while $x \le y$. Initial decision parameter: $$p0 = 1 - r = 1 - 5 = -4$$ Update rules: - If $p < 0$: $x = x+1$, $p = p + 2x + 1$ - If