vha3 / Hunter-Adams-RP2040-Demos

Demo code for the Raspberry Pi Pico
193 stars 54 forks source link

-2 belongs to the Mandelbrot set #3

Open rs1729 opened 6 months ago

rs1729 commented 6 months ago

Thanks for the nice lectures!

Your escape check in VGA_Graphics/Mandelbrot_Set/mandelbrot_fixvfloat.c should be |z|^2 > 4, and not https://github.com/vha3/Hunter-Adams-RP2040-Demos/blob/f5f85bafe148e3ee578c67afbdb08fc9f6d4ec0f/VGA_Graphics/Mandelbrot_Set/mandelbrot_fixvfloat.c#L101 https://github.com/vha3/Hunter-Adams-RP2040-Demos/blob/f5f85bafe148e3ee578c67afbdb08fc9f6d4ec0f/VGA_Graphics/Mandelbrot_Set/mandelbrot_fixvfloat.c#L188

The parameter c=-2 belongs to the Mandelbrot set. For this parameter the critical point is pre-periodic (0 -> -2 -> 2 -> 2 -> ...), so it is bounded and the corresponding Julia set is connected (it is the interval [-2,2] on the real axis). If the orbit gets outside of radius 2, you can show that it escapes to infinity, i.e. that the parameter is not in the Mandelbrot set.