Scan Converting a Circle using Trigonometric Method
What is Scan Converting a Circle using Trigonometric Method:
This method of circle drawing uses trigonometric functions:
(i) x=r cosϴ
(ii) y=r sinϴ, where ϴ= current angles
(iii) r=radius (Circle Radius)
(iv) x=x_cooridinate
(v) x=x_cooridinate
In this method, ϴ is stepped from ∏/4 and each value of x and y is calculated. However, this method is not efficient because the calculation of sinϴ and cosϴ is very time-consuming than the calculations required by the polynomial method.
Algorithm:
1. Set initial variables.
(i) r=circle radius
(ii) (h, k)= Coordinates of circle center.
(iii) i=step size
(iv) ϴend=∏/4
(v) Radian=45○
(vi) ϴ=0
2. Check whether the entire circle has been drawn.
If ϴ>ϴend then stop
3. Calculate the values of x and y coordinates
x=rcos(ϴ)
y=rsin(ϴ)
4. Plot eight points with respect to the center (h, k) at current (x, y) coordinates.
Plot (x + h, y + k) Plot (-x + h, -y + k)
Plot (y + h, x + k) Plot (-y + h, -x + k)
Plot (-y + h, x + k) Plot (y + h, -x + k)
Plot (-x + h, y + k) Plot (x + h, -y+ k)
5. ϴ=ϴ+i
6. goto step 2.