.. _example-drawing-with-functions: Functions: Drawing with functions ================================= This example shows how to define functions that draw objects. Such as ``draw_tree(x, y)`` and ``draw_bird(x, y)``. .. raw:: html <iframe src="https://player.vimeo.com/video/167296062?byline=0&portrait=0" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p><a href="https://vimeo.com/167296062">Drawing with Functions</a> from <a href="https://vimeo.com/user6672093">Paul Vincent Craven</a> on <a href="https://vimeo.com">Vimeo</a>.</p> .. .. image:: drawing_with_functions.png .. :width: 600px .. :height: 600px .. :align: center .. :alt: Screenshot of drawing with functions example program .. literalinclude:: ../../examples/drawing_with_functions.py