Question: Assume you have a function 'void drawPixel(int x, int y)' which given the x and y of a point, draws it on the screen. Write
Assume you have a function 'void drawPixel(int x, int y)' which given the x and y of a point, draws it on the screen. Write a function which given the radius of a circle, its location (x, y) and start and end angles in degree, draws and arc of that circle on the screen, which is between start and end angle. The signature of the function is:
void drawCircle(int radius, int x, int y, int start, int end);
Note: the input of sin and cos function in C/C++ are in radian.
Hint: The function does not have to be the most optimum solution as long as it provides a smooth and monotonic arc.
Hint2: You can assume that start < end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
