0% found this document useful (0 votes)
20 views8 pages

CG 6

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views8 pages

CG 6

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

COMPUTER GRAPHICS

(BCSPC7010)
7th Semester CSE (R-17)

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


SCHOOL OF ENGINEERING AND TECHNOLOGY
GIET UNIVERSITY, GUNUPUR
REVISION : 05
• Scan Conversion of Circle
• Bresenham’s Method For Circle Drawing

Today
• Mid Point Method For Circle Drawing
MID POINT CIRCLE DRAWING ALGRITHM
Mid-point circle drawing algorithm also utilizes the eight point
symmetry about origin in the respective octants.
In Bresenham’s circle algorithm, we found out whether pixel A or pixel
B is closure to the true circle. But in the mid-point circle algorithm, we
find the decision factor

at the mid-point of A and B. The decision factor defines the mid-point is


inside or outside the circle.
MID POINT CIRCLE DRAWING ALGRITHM
The mid-point M between and
is Therefore the decision factor becomes

if
If
The decision factor for the next step is

but
MID POINT CIRCLE DRAWING ALGRITHM
By subtracting from both side

As we know is either or

When
When
The decision factor for determining the next pixel becomes
=
MID POINT CIRCLE DRAWING ALGRITHM
Mid point circle(r)
{
int x=0,y=r,d;
d=1-r;
while(y>x)
{
putpixel(x,y, value)
if(d<=0)
{
d=d+2x+3
x++
}
else
{
d=d+2(x-y)+5
x++
y- -
}
}
}
MID POINT CIRCLE DRAWING ALGRITHM
i d X Y (X,Y) A (0,8) , (1,8), (2,8), (3,7),
(4,7),(5,6)
B
0 0 8 (0,8) (8,0) , (8,1), (8,2), (7,3),
(7,4),(6,5)
C
1 1 8 (1,8) (8,0) , (8,-1), (8,-2),(7,-3),
(7,-4),(6,-5)
D
2 2 8 (2,8) (0,-8) , (1,-8), (2,-8), (3,-7),
(4,-7),(5,-6)
3 3 7 (3,7) E (0,-8), (-1,-8), (-2,-8), (-3,-7),
(-4,-7),(-5,-6)
F
4 4 7 (4,7) (-8,0), (-8,-1), (-8,-2), (-7,-3),
(-7,-4),(-6,-5)
G
5 5 6 (5,6) (-8,0) , (-8,1), (-8,2),(-7,3),
(-7,4), (-6,5)
H
(0,8) , (-1,8), (-2,8),(-3,7),
(-4,7), (-5,6)
REVISION : 06
• Mid Point Method For Circle Drawing

NEXT CLASS
• Polygon Filling

You might also like