CS3388 ASSIGNMENT 1
CS3388 ASSIGNMENT 1
Due date: Friday Jan. 24th 2020, at 11:00pm.
Weight: 10% of final mark
The purpose of this assignment is to complete the Python class graphicsWindow found in file graphicsWindow.py.
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 slopes
- be properly documented (Header comments: descrpition of parameters, what the method does, and description of output. Code comments: description of non-obvious
sections of code)
- The class graphicsWindow is available in the Resources Section of OWL, under Python Code
- 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 graphicsWindow.py containing your method drawLine(p1,p2,color)