LOGO challenge - trees
Recursion and the some beautiful results
Problem
Think carefully about the two procedures below.
Investigate these procedures, alter the parameter ' :T ' within BRAN and BRAN2 as you think fit.
TO BRAN :T
IF 30 > :T [STOP]
FD :T
RT 30
BRAN :T - 50
LT 60
BRAN :T - 50
RT 30
BK :T
END
TRY BRAN 250 and go from there
TO BRAN2 :T
IF 40 > :T [STOP]
FD :T
RT 60
BRAN2 :T - 50
LT 60
BRAN2 :T - 50
LT 60 BRAN2 :T - 50
RT 60
BK :T
END
TRY BRAN2 240 and likewise investigate further
What conclusions can you come to?
How about this ...
Image
Can you make progress towards producing these trees.
There is lots of help in the notes if you need it but don't look too soon.
Teachers' Resources
Here are some procedures that might prove helpful:
Alter the parameter :T within BRAN3 and BRAN4 as you think fit.
TO BRAN3 :T
IF 20 > :T [STOP]
FD :T
RT 15
BRAN3 :T - 25
LT 30
BRAN3 :T - 10
RT 15
BK :T
END
Start with BRAN3 140 and explore from there!
TO BRAN4 :T
IF 30 > :T [STOP]
FD :T
RT 30
BRAN4 :T * (.6 + .02 * RANDOM 10)
LT 60
BRAN4 :T * (.6 + .02 * RANDOM 10)
RT 30
BK :T
END
Try BRAN4 180 and explore from there!