Lesson goal: Animated-GIF with functions
Previous: Make complex objects move
| Next: Draw a map
Ok, so you now know how to make
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
that will draw a person at the point
. 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: