Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
198 views

HTTP WWW - Google.com - PK Url Q HTTP WWW - Eazynotes.com Notes Computer-Graphics Algorithms Mid-point-circle-Algorithm

The document describes the mid-point circle algorithm for drawing a circle given a center point and radius. It outlines the steps to calculate and draw each pixel on the circle by incrementing X and Y values and checking against the circle equation at each step until the entire circumference is drawn.
Copyright
© Attribution Non-Commercial (BY-NC)
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)
198 views

HTTP WWW - Google.com - PK Url Q HTTP WWW - Eazynotes.com Notes Computer-Graphics Algorithms Mid-point-circle-Algorithm

The document describes the mid-point circle algorithm for drawing a circle given a center point and radius. It outlines the steps to calculate and draw each pixel on the circle by incrementing X and Y values and checking against the circle equation at each step until the entire circumference is drawn.
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 1

www.eazynotes.

com

Gursharan Singh Tatla

Page No. 1

MID POINT CIRCLE ALGORITHM


Mid-Point Circle ( Xc, Yc, R):
Description: Here Xc and Yc denote the x coordinate and y coordinate of the center of the circle. R is the radius. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. Exit Else Set Y = Y 1 P = P + 2(X Y) + 1 [End of If] Call Draw Circle(Xc, Yc, X, Y) [End of While] Set X = 0 and Y = R Set P = 1 R Repeat While (X < Y) Call Draw Circle(Xc, Yc, X, Y) Set X = X + 1 If (P < 0) Then P = P + 2X + 6

Draw Circle (Xc, Yc, X, Y):


1. 2. 3. 4. 5. 6. 7. 8. 9. Call PutPixel(Xc + X, Yc, + Y) Call PutPixel(Xc - X, Yc, + Y) Call PutPixel(Xc + X, Yc, - Y) Call PutPixel(Xc - X, Yc, - Y) Call PutPixel(Xc + Y, Yc, + X) Call PutPixel(Xc - Y, Yc, + X) Call PutPixel(Xc + Y, Yc, - X) Call PutPixel(Xc - Y, Yc, - X) Exit

You might also like