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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started