/GeneralizedMandelbrot

Code to create an animation of the generalized mandelbrot set.

Primary LanguageC

GeneralizedMandelbrot

Watch it here: https://youtu.be/d03pICfBP9c

2020-2021 CS Independent Study.

The Mandelbrot Set is defined as all the points on the complex plane which stay bounded (do not tend towards infinity) when plugged into the recursive formula equation , where p is the starting point. The Generalized Mandelbrot Set (sometimes called the Multibrot Set) is an extension of the Mandelbrot Set, equation where the power is allowed to be any complex number c, instead of 2. Points in black stay bounded, points in red tend towards infinity fastest.

A complex number can be raised to any number n, equation , by first changing it from its rectangular form (used in coding), equation , to its polar form, equation , and then to its exponential form, equation . The exponent can then be distributed, equation . It must be brought back to its rectangular form to be used in the code, so it must be transformed to its polar form, equation , then finally to the rectangular form, equation . Recalling equation and equation , the final, exact value of equation is found to be equation .

Computation time alone, this took around 170 hours. Inclding time to write, test, and debug the code, it probably took somewhere close to 190 hours.

I added a few comments where necessary, but that being said, gaze through this code at your own risk :)