19-12-2012, 06:25 PM
BRESENHAM’S CIRCLE DRAWING ALGORITHM
BRESENHAM’S CIRCLE DRAWING ALGORITHM.docx (Size: 12.83 KB / Downloads: 19)
ALGORITHM:
1. Start the program.
2. Declare the variables and initiate the graph.
3. To read the values of X-axis, Y-axis and radius co-ordinates.
4. Calculate the pixel position(x,y) onto the circular path(x1,y1)
5. Give the condition for drawing a circle whether x is less than y by using WHILE looping.
6. In the loop we put the pixel position in the path by incrementing or decrementing the position.
7. To calculate the value of the parameter by using if loop condition
8. Check whether P is less than zero the X-axis pixel positions are incremented and parameter value also incremented by twice
9. Check whether P is not less than zero X-axis pixel positions are incremented and Y-axis pixel positions are decremented.
10. Finally after finishing the loop condition the pixels are form a circle.