0% found this document useful (0 votes)
15 views

CG-Practical 03 (Midpoint Circle Algorithm) 1

The document discusses implementing the midpoint circle algorithm to draw circles on a screen. It explains that the midpoint circle algorithm calculates all perimeter points of a circle in the first octant and then prints the mirror points in other octants since a circle is symmetric about its center. It outlines the steps of finding the midpoint between two possible pixels and plotting the pixel that lies inside or on the circle perimeter.

Uploaded by

Sahil K
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

CG-Practical 03 (Midpoint Circle Algorithm) 1

The document discusses implementing the midpoint circle algorithm to draw circles on a screen. It explains that the midpoint circle algorithm calculates all perimeter points of a circle in the first octant and then prints the mirror points in other octants since a circle is symmetric about its center. It outlines the steps of finding the midpoint between two possible pixels and plotting the pixel that lies inside or on the circle perimeter.

Uploaded by

Sahil K
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

EXPERIMRNT NO.

: 03

AIM:

Implement midpoint Circle algorithm.

INTRODUCTION:

Drawing a circle on the screen is a little complex than drawing a line. There are
two popular algorithms for generating a circle − Bresenham’s Algorithm and
Midpoint Circle Algorithm. These algorithms are based on the idea of
determining the subsequent points required to draw the circle.

THEORY:

We use the Midpoint Circle algorithm to calculate all the perimeter points of
the circle in the first octant and then print them along with their mirror points
in the other octants. This will work only because a circle is symmetric about it’s
center. For any given pixel (x, y), the next pixel to be plotted is either (x, y+1) or
(x-1, y+1). This can be decided by following the steps below.
1. Find the mid-point p of the two possible pixels i.e (x-0.5, y+1)
2. If p lies inside or on the circle perimeter, we plot the pixel (x, y+1), otherwise
if it’s outside we plot the pixel (x-1, y+1)

You might also like