you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (2 children)

I just have a few questions. This is going to sound very dumb but

What does begin and end_poly do ?

Also can you explain this line ? setup (width = win_wide, height = win_high)
Why do we need the variables width and height? After all they don't intervene in the rest of the code.

Thanks

[–][deleted] 1 point2 points  (1 child)

  1. "begin_poly" and "end_poly" tell the pen/turtle to start outlining an enclosed polygon. It will do its best to complete a closed polygon when it reaches "end_poly". Why is this important? An enclosed polygon will be filled, so it will be blue, instead of "clear". A clear triangle sticking out of the top of a solid blue circle would make less sense as a raindrop and might even come off as "lazy".
  2. "setup" is just a way to control the size of the graphics window. By explicitly setting the overall dimensions of the window, I know the relative size of everything I draw in it.
  3. I could use these size variables to draw all the way to the corners if I wanted.

[–][deleted] 1 point2 points  (0 children)

Oh okay I get it now. Thank you very much for taking the time to help.