Lesson goal: Animated-GIF with functions

Previous: Make complex objects move | Home | Next: Draw a map

Ok, so you now know how to make complex objects move, using lines and circles.

In this lesson, let's make drawing such objects easier on ourselves, by using functions. You remember functions from this lesson, don't you?

In the code below, we've made a function called person that will draw a person at the point (x,y). Look how easy functions make it to have 3 people walking around at once!

See the example for how to use a function to draw people of different sizes.

Now you try. Draw some people, or try putting some of your own objects into functions.

Type your code here:

See your results here: