Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Write a function to draw a line using the Basic line drawing algorithm. The following is a function header example: Basic-alg (int x0, int
1. Write a function to draw a line using the Basic line drawing algorithm. The following is a function header example: Basic-alg (int x0, int yo, int xl, int yl ) Use this function to draw N lines (N is provided by the user) at positions (i.e., end coordinates) determined by a random number generator. (10 points) 2. Write a function to draw a line using the "Bresenham" algorithm. The following is a header example: brz (int x0, int yo, int xl, int yl ) Use this function to draw N lines (N is provided by the user) at positions (i.e., end coordinates) determined by a random number generator. (10 points) 3. Report/Experiments: Provide some results (screen shots, ...) in the report. Your mission in writing this report is to convince the reader that your programs work correctly. Experiment with your code Time each of the above programs (1 & 2) (the critical parts only) and create a table of timings for each. Write up your concluding remarks based on your experiments. What impact does the length of lines have on performance? How about the number of lines? ... (10 points)
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