I’m currently working on curriculum development for our AP Computer Science and our new textbook (Cay Horstmann’s [Java Concepts: Early Objects, 7th edition](http://www.horstmann.com/bigjava.html)). As part of this effort, my counterpart at our district’s other high school and I were sharing some of our favorite labs. One that I shared was the Fractal Tree Lab that my class did this year as part of the recursion unit.
I found this [fractal tree assignment](http://220.127.116.11/staff/peck_george/notemplate/JavaCS/FractalTree/FractalTreeGenerator.html) online when searching for a fractal example of recursion that my students would find interesting. I believe this assignment is authored by George Peck at Lynbrook High School, but I couldn’t find a reference to it other than through a Google search.
We started with example code for an applet that generated a [Koch Snowflake](http://en.wikipedia.org/wiki/Koch_snowflake). We then built upon this example to create our fractal trees. I’m fortunate that my inaugural AP Computer Science students were fantastic about providing me honest feedback throughout the year. For this lab, they shared that the assignment provided way too much support and I should have let them figure more of the algorithm out on their own. Based on this feedback, I edited the original assignment to provide less direction.
The fractal tree should look like this:
Along my goal of providing [differentiation and choice in programming activities](https://pedagoguepadawan.net/212/differentiation-and-choice-in-programming-activities/), I encouraged students to “add more awesomeness” to their fractal trees. Here are some examples of what they did:
Another student made an interactive fractal tree where you could adjust the growth of the tree with a scroll bar. Another made his fractal tree animated and grow slowly.
I’m looking forward to seeing what next year’s students come up with when provided less explicit support but some cool examples from this year’s class.