Homework 1: Snowflake
Due: Thursday, Sept. 17, 11:59pm on Moodle
__init__
drawmethod for Point, using the setPixel method from Lab 1.
__init__method for Line.
drawmethod for Line, using the algorithm discussed in class on Monday.
python hw1.pyIf everything works correctly, this should tell you what arguments the program takes. Then run:
python hw1.py hw1_your_name 400 400You should get a black square. Now, in the make_image method, uncomment each line (there should be six of them) one at a time to test your line algorithm. The last line might not look very good, why is that?
def snowflake(x,y):that draws a snowflake centered at a specific position, (x,y). Use this method to draw multiple snowflakes. What other arguments could you add to the snowflake method?
Note: you can receive full credit for this assignment without doing the bonus, it is completely optional.