Skip to content

Instantly share code, notes, and snippets.

@Raze369
Raze369 / Forest HW.py
Created June 27, 2015 21:02
Forest HW.py
import canvas
canvas.set_size(1000, 600)
def draw_tree(x, y, w, trunk_h, leaf_h, trunk_w):
canvas.begin_path()
canvas.move_to(x-w/2, y+trunk_h)
canvas.add_line(x+w/2, y+trunk_h)
canvas.add_line(x, y + trunk_h+leaf_h)
canvas.close_path()