PadhaikoAll subjects

Past exam question: 2081 Chaitra (Regular), Q2(a)

Computer Graphics and Visualization · 7 marks

Open in the Padhaiko app

Topic: Mid-Point Circle & Ellipse Algorithms

Question

How the decision parameter can be used to draw a Circle? Draw the circle with the radius 7 and centre (10,15).

Solution

Decision Parameter in the Midpoint Circle Algorithm: In the Midpoint Circle Algorithm, the decision parameter is used to determine which of two candidate pixels lies closer to the actual circular boundary defined by . In the first octant ( to , where the curve slope ranges from to ):

Decision Rule:

Starting at , the initial decision parameter evaluated with integer arithmetic is:

Initial Conditions for Radius : Given radius and center :

Step-by-Step Computation for First Octant: We iterate until :

Chosen Pixel Calculation
0 ()
1 ()
2 ()
3 ()
4 ()

The loop terminates at because .

Midpoint circle raster, r = 7 (drawn about the origin; add (10, 15) to every pixel) -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7
Midpoint circle raster, r = 7 (drawn about the origin; add (10, 15) to every pixel)

The resulting points in the first octant (origin-centered) are:

Applying 8-Way Symmetry and Translation to Center : Using 8-way symmetry, every octant point generates 8 points on the circle: and with center :

  1. For :
  1. For :
  1. For :
  1. For :
  1. For :
  1. For :
Answer:
  1. The decision parameter tests whether the midpoint between candidate pixels lies inside () or outside () the circle boundary.
  2. For radius , the first-octant coordinates are:

Translated to center using 8-way symmetry, these map to the complete circular raster boundary.

All past exam questions for Computer Graphics and Visualization