Circle
Circle
Circle
Lecture 06
Circle Drawing Techniques
What is Circle
A circle is the set of points in a plane that are equidistant from
a given point O. The distance r from the center is called the
radius, and the point O is called the center. Twice the radius
is known as the diameter. The angle a circle subtends from
its center is a full angle, equal to 360 or 2 radians.
Circle Cont..
Circle Cont..
A circle has the maximum possible area for a given
perimeter, and the minimum possible perimeter for a given
area.
The perimeter C of a circle is called the circumference, and is
given by
C=2r
Drawbacks/ Shortcomings
This works, but
. is inefficient
. multiplications & square root
. large gaps in the circle for values of
r
(as shown in the next figure)
x close to
Drawbacks/ Shortcomings
Discussion
- very simple technique
- solves problem of unequal space
- is inefficient in terms of calculations
- involves floating point calculations
Reduction in Calculations
Symmetry in octants
Upper half circle symmetric to lower half circle
Left half circle symmetric to right half circle
Finally two halves of the same quarters are symmetric to
each other
Optimized Algorithm
DrawSymmeticPoints (xcenter, ycenter, x, y)
Plot (x + xcenter, y + ycenter)
Plot (y + xcenter, x + ycenter)
Plot (y + xcenter, -x + ycenter)
Plot (x + xcenter, -y + ycenter)
Plot (-x + xcenter, -y + ycenter)
Plot (-y + xcenter, -x + ycenter)
Plot (-y + xcenter, x + ycenter)
Plot (-x + xcenter, y + ycenter)
X2- Y2 - r2 =0
X=Y
X2+Y2-R2=0
Xk+1
2xk+1 = 2xk +2
2yk+1 =2yk -2