19-12-2012, 06:26 PM
BRESENHAMS ELLIPSE GENERATION ALGORITHM
BRESENHAMS ELLIPSE GENERATION ALGORITHM.docx (Size: 13.03 KB / Downloads: 15)
BRESENHAMS ELLIPSE GENERATION ALGORITHM
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 ellipse whether x is less than y by using WHILE loop.
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 ellipse.
11. Stop the program.