CS3388 ASSIGNMENT 1 Solved

Original price was: $40.00.Current price is: $35.00.



5/5 - (2 votes)

The purpose of this assignment is to complete the Python class graphicsWindow found in file You are asked to program a method drawLine(p1,p2,color) that draws a line
in the image from point p1 to point p2 with color color. The points p1 and p2 are expressed
as tuples (x,y). The color is also a tuple of the form (r,g,b) where r,g,b are values
between 0 and 255. The method drawLine(p1,p2,color) must:

implement Bresenham’s integer line drawing algorithm correctly, for lines of all
be properly documented (Header comments: descrpition of parameters, what the
method does, and description of output. Code comments: description of nonobvious sections of code)
The class graphicsWindow is available in the Resources Section of OWL, under Python

Do not change file name nor the actual name of the graphicsWindow class
Make sure your method drawLine(p1,p2,color) is actually called drawLine
Repsect the type and order of the parameters
Use the following Python program to test Drawline(p1,p2,color)

The output of the test program should correspond exactly to this image
Use OWL to submit the file containing your method
You must use Python 3.7 and PyCharm 2018.2 or above for this assignment. Before
submitting your assignment, please refer to the assignment marking scheme and
submission guidelines.