This project is similar to the previous one, except that this uses a depth-first algorithm instead. Same as before, the 'space' key can be pressed at any point to toggle rainbow mode. The green flag can be used to restart the animation at any point.
The breadth-first version can be found here: https://scratch.mit.edu/projects/860857445/ This version uses recursion to draw the branches, so the order in which the branches are drawn are noticeably different. This version is actually quite a bit simpler than the previous one, as the function stack of Scratch does most of the work. #animation #pentree #algorithm