Download presentation

Presentation is loading. Please wait.

Published byDeja Hebron Modified over 2 years ago

1
Lecture 4 Graphic Primitives, Circle

2
Drawing Circles

3
Brute Force Method

4
Cheating with 8 arcs

5
Cheating with 8 arcs Implementation

7
Digital Differential Analysis - An incremental algorithm Does not require sine or cosine table. based upon calculating the gradient of a circle at a point and using that to approximate the position of the next point.

8
Digital Differential Analysis - An incremental algorithm

9
Digital Differential Analysis - Implementation

10
Bresenham’s algorithm for circles Based on limiting the choice of the next pixel to be plotted to two alternatives, then creating and testing a decision variable to determine which alternative is actually plotted. D(Si) and D(Ti) represent the differences between the squared distance between the center of the circle and the middle of pixels S and T. Whichever is smallest corresponds to the pixel that should be plotted. To combine the two calculations into one “decision variable” is simply a matter of subtracting the two expressions:

11
Bresenham’s algorithm for circles

12
Implementation for Bresenham’s algorithm

13
Implementation for circles

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google