Professional Documents
Culture Documents
Lecture 06
Lecture 06
(BCSPC7010)
7th Semester CSE (R-17)
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
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