ScratchData LogoScratchData
Back to johnm's profile

Fractal Tree

JOjohnm•Created February 1, 2012
Fractal Tree
309
225
8619 views
View on Scratch

Description

This uses the new "Make a Block" feature to draw a tree-like picture. If you were going to tell someone to draw the simplest possible tree, you might say: to draw a tree: draw a straight trunk draw a branch to the left draw a branch to the right But wait! The branches themselves branch, so they actually just a smaller trees. So you could say: to draw a tree: draw a straight trunk draw a smaller tree to the left draw a smaller tree to the right That's how this program works. The parameter "h" determines the size ("height") of the tree, and each time it draws a branch it makes "h" be little smaller. To make it prettier, I also made it change color each time it branches. But hold on -- won't this program keep making smaller and smaller trees forever? That's what the "if" is for -- to make sure that it stops when the branches get too small.

Project Details

Project ID10000007
CreatedFebruary 1, 2012
Last ModifiedFebruary 1, 2012
Visibilityvisible
CommentsAllowed