Computer Graphics20815 marksNumerical: Midpoint circle algorithmScan Converting Circle and Ellipse
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]
- 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