In this lab students work either in pairs or individually to write a program that displays the Mandelbrot set. Students incrementally write functions that help them deal with nested loops, complex numbers, and graphics until they have a program that can display and zoom in/out of the Mandelbrot set. There are optional parts to the assignment that deal with visualizing escape velocities and "Mandelbrotifying" an image. In addition to reviewing nested loops and graphics, this lab requires students to use constants and use incremental design. It is particularly useful for students who need additional practice with nested loops.
Create associations between fractal images and geometric patterns found in nature, technology, art, and law to make the Context even more Meaningful and Relevant to your students. Give students information about the types and frequency of additional support (such as office hours and lab sessions), particularly when covering fractals, as a way to provide Effective Encouragement. Encourage students to use the Pair Programming learning strategy to facilitate concept understanding and exploration.
This material uses graphics and a famous fractal to Employ Meaningful and Relevant Content. Has optional extensions as a way of Incorporating Student Choice.