Tuesday, October 2, 2012

TurtleArt: Procedures

TurtleArt comes with primitives, or programs that the turtle knows how to do. Here are the TurtleArt primitives for movement.


We learned that we can snap together bricks to make the turtle complete a series of movements. These connected bricks make a program. We can name this program, which teaches the computer a new command. Use the My Blocks tab and put a diamond-shaped block on top of your collection of blocks. Click on the block and you can type a name in the block.


Together, these collections of named commands are called procedures. Here are two procedures, one called circle, the other called donut.


The donut procedure uses the circle procedure. Since donut uses a forever block the turtle keeps drawing, which makes the shape seem animated.


No comments: