Setting Up the Recursion
- Select points in your sketch in the same order as they are listed in the givens of your script, but instead of point root, choose point fork, and instead of point fork, choose the point at the end of the left branch. Press the Loop button in the script window. In essence, you're telling Sketchpad to now grow a second tree starting with the left branch of the first tree. Because you are using the same values for A, B, and C, the second three will grow and branch just like the first tree.
- Repeat step 1, except this time substitute the point root'' at the end of the right branch for point fork. You're now growing a third tree on the right-hand branch of the first tree.
- Hide all the points, except the five givens.The contents of your script window should look similar to that shown below:
- Press the stop button in the script window.
Playing the Script
- Bring the sketch window to the front again and Undo all the way back to the place where you have the givens ready for the script.
- Select the five points in the order shown in the givens of the script window.
- Press the Step button. You get a chance to decide how many levels of recursion to play. (On slower machines, keep the levels below 4!)
- Each press of the Step button will play one step of the script. When you get tired of watching, press Play or Fast.
Test your observations on the next page.
© 1995 Key Curriculum Press