In class, we discussed fractals as one interesting example of implicitly-defined geometry. In this quiz, you will write some very, very simple code to implement a beautiful variation on the classic Mandelbrot set, called the Julia set:
The basic idea is almost identical to the Mandelbrot set: iterate the complex recurrence
$$ z \gets z^2 + c $$
until the norm of the point $z$ either diverges, or converges to some stable point. (There are also points that will just wander around the plane periorically forever---for this reason, one typically caps the number of iterations at some maximum value.)
Your task is to implement this recurrence in the starter code here---almost everything has been setup for you already:
You will find two sections of the code labeled PART I and PART II, which describe exactly what to do. PART III of the assignment is to play with the parameters and colors in the code, and generate the most beautiful Julia set you possibly can.
Handin
To hand this quiz in you should:
- post a picture of your result on Piazza, in full glorious color, and
- print out the two chunks of your solution code (for PART I and PART II) and bring them to the beginning of the next lecture.
*Sorry, there are actually no pterodactyls in this quiz.