# Mandelbrot on GeoGebra

Niek Sprakel shared this question 2 years ago

When searching GeoGebra resources for interactive Mandelbrot-related content, there are many that feature an image of a Mandelbrot and a series of points superimposed on the image to illustrate the orbits of a particular point in the complex plane.

Would it be possible/feasible somehow to use GeoGebra to create a kind of sequence of lemniscates to obtain an actual depiction of the Mandelbrot fractal in GeoGebra as a series of curves approaching the Mandelbrot set?

Something like in this screenshot:

But the approach there seems a bit unwieldy and after just a few consecutive lemniscates GeoGebra slows down and the curves get glitchy. 1 1

Here is the ggb file. 1

I've expanded those in the CAS and then copied to the Algebra View - does that work a little better?

I think whatever method you do, you will hit a limitation very quickly with the exponential increase in complexity

```a: x^(2) + y^(2) = 4
b: (((2 * x) * y) + y)^(2) + (x^(2) - y^(2) + x)^(2) = 4
c: ((((-4) * x) * y^(3)) + ((4 * x^(3)) * y) - (2 * y^(3)) + ((6 * x^(2)) * y) + ((2 * x) * y) + y)^(2) + (x^(4) + y^(4) - ((6 * x^(2)) * y^(2)) + (2 * x^(3)) - ((6 * x) * y^(2)) + x^(2) - y^(2) + x)^(2) = 4
e: ((((-8) * x) * y^(7)) + ((56 * x^(3)) * y^(5)) - ((56 * x^(5)) * y^(3)) + ((8 * x^(7)) * y) - (4 * y^(7)) + ((84 * x^(2)) * y^(5)) - ((140 * x^(4)) * y^(3)) + ((28 * x^(6)) * y) + ((36 * x) * y^(5)) - ((120 * x^(3)) * y^(3)) + ((36 * x^(5)) * y) + (6 * y^(5)) - ((60 * x^(2)) * y^(3)) + ((30 * x^(4)) * y) - ((20 * x) * y^(3)) + ((20 * x^(3)) * y) - (2 * y^(3)) + ((6 * x^(2)) * y) + ((2 * x) * y) + y)^(2) + (x^(8) + y^(8) - ((28 * x^(2)) * y^(6)) + ((70 * x^(4)) * y^(4)) - ((28 * x^(6)) * y^(2)) + (4 * x^(7)) - ((28 * x) * y^(6)) + ((140 * x^(3)) * y^(4)) - ((84 * x^(5)) * y^(2)) + (6 * x^(6)) - (6 * y^(6)) + ((90 * x^(2)) * y^(4)) - ((90 * x^(4)) * y^(2)) + (6 * x^(5)) + ((30 * x) * y^(4)) - ((60 * x^(3)) * y^(2)) + (5 * x^(4)) + (5 * y^(4)) - ((30 * x^(2)) * y^(2)) + (2 * x^(3)) - ((6 * x) * y^(2)) + x^(2) - y^(2) + x)^(2) = 4
f: ((((-16) * x) * y^(15)) + ((560 * x^(3)) * y^(13)) - ((4368 * x^(5)) * y^(11)) + ((11440 * x^(7)) * y^(9)) - ((11440 * x^(9)) * y^(7)) + ((4368 * x^(11)) * y^(5)) - ((560 * x^(13)) * y^(3)) + ((16 * x^(15)) * y) - (8 * y^(15)) + ((840 * x^(2)) * y^(13)) - ((10920 * x^(4)) * y^(11)) + ((40040 * x^(6)) * y^(9)) - ((51480 * x^(8)) * y^(7)) + ((24024 * x^(10)) * y^(5)) - ((3640 * x^(12)) * y^(3)) + ((120 * x^(14)) * y) + ((392 * x) * y^(13)) - ((10192 * x^(3)) * y^(11)) + ((56056 * x^(5)) * y^(9)) - ((96096 * x^(7)) * y^(7)) + ((56056 * x^(9)) * y^(5)) - ((10192 * x^(11)) * y^(3)) + ((392 * x^(13)) * y) + (60 * y^(13)) - ((4680 * x^(2)) * y^(11)) + ((42900 * x^(4)) * y^(9)) - ((102960 * x^(6)) * y^(7)) + ((77220 * x^(8)) * y^(5)) - ((17160 * x^(10)) * y^(3)) + ((780 * x^(12)) * y) - ((1128 * x) * y^(11)) + ((20680 * x^(3)) * y^(9)) - ((74448 * x^(5)) * y^(7)) + ((74448 * x^(7)) * y^(5)) - ((20680 * x^(9)) * y^(3)) + ((1128 * x^(11)) * y) - (116 * y^(11)) + ((6380 * x^(2)) * y^(9)) - ((38280 * x^(4)) * y^(7)) + ((53592 * x^(6)) * y^(5)) - ((19140 * x^(8)) * y^(3)) + ((1276 * x^(10)) * y) + ((1140 * x) * y^(9)) - ((13680 * x^(3)) * y^(7)) + ((28728 * x^(5)) * y^(5)) - ((13680 * x^(7)) * y^(3)) + ((1140 * x^(9)) * y) + (94 * y^(9)) - ((3384 * x^(2)) * y^(7)) + ((11844 * x^(4)) * y^(5)) - ((7896 * x^(6)) * y^(3)) + ((846 * x^(8)) * y) - ((552 * x) * y^(7)) + ((3864 * x^(3)) * y^(5)) - ((3864 * x^(5)) * y^(3)) + ((552 * x^(7)) * y) - (44 * y^(7)) + ((924 * x^(2)) * y^(5)) - ((1540 * x^(4)) * y^(3)) + ((308 * x^(6)) * y) + ((156 * x) * y^(5)) - ((520 * x^(3)) * y^(3)) + ((156 * x^(5)) * y) + (14 * y^(5)) - ((140 * x^(2)) * y^(3)) + ((70 * x^(4)) * y) - ((20 * x) * y^(3)) + ((20 * x^(3)) * y) - (2 * y^(3)) + ((6 * x^(2)) * y) + ((2 * x) * y) + y)^(2) + (x^(16) + y^(16) - ((120 * x^(2)) * y^(14)) + ((1820 * x^(4)) * y^(12)) - ((8008 * x^(6)) * y^(10)) + ((12870 * x^(8)) * y^(8)) - ((8008 * x^(10)) * y^(6)) + ((1820 * x^(12)) * y^(4)) - ((120 * x^(14)) * y^(2)) + (8 * x^(15)) - ((120 * x) * y^(14)) + ((3640 * x^(3)) * y^(12)) - ((24024 * x^(5)) * y^(10)) + ((51480 * x^(7)) * y^(8)) - ((40040 * x^(9)) * y^(6)) + ((10920 * x^(11)) * y^(4)) - ((840 * x^(13)) * y^(2)) + (28 * x^(14)) - (28 * y^(14)) + ((2548 * x^(2)) * y^(12)) - ((28028 * x^(4)) * y^(10)) + ((84084 * x^(6)) * y^(8)) - ((84084 * x^(8)) * y^(6)) + ((28028 * x^(10)) * y^(4)) - ((2548 * x^(12)) * y^(2)) + (60 * x^(13)) + ((780 * x) * y^(12)) - ((17160 * x^(3)) * y^(10)) + ((77220 * x^(5)) * y^(8)) - ((102960 * x^(7)) * y^(6)) + ((42900 * x^(9)) * y^(4)) - ((4680 * x^(11)) * y^(2)) + (94 * x^(12)) + (94 * y^(12)) - ((6204 * x^(2)) * y^(10)) + ((46530 * x^(4)) * y^(8)) - ((86856 * x^(6)) * y^(6)) + ((46530 * x^(8)) * y^(4)) - ((6204 * x^(10)) * y^(2)) + (116 * x^(11)) - ((1276 * x) * y^(10)) + ((19140 * x^(3)) * y^(8)) - ((53592 * x^(5)) * y^(6)) + ((38280 * x^(7)) * y^(4)) - ((6380 * x^(9)) * y^(2)) + (114 * x^(10)) - (114 * y^(10)) + ((5130 * x^(2)) * y^(8)) - ((23940 * x^(4)) * y^(6)) + ((23940 * x^(6)) * y^(4)) - ((5130 * x^(8)) * y^(2)) + (94 * x^(9)) + ((846 * x) * y^(8)) - ((7896 * x^(3)) * y^(6)) + ((11844 * x^(5)) * y^(4)) - ((3384 * x^(7)) * y^(2)) + (69 * x^(8)) + (69 * y^(8)) - ((1932 * x^(2)) * y^(6)) + ((4830 * x^(4)) * y^(4)) - ((1932 * x^(6)) * y^(2)) + (44 * x^(7)) - ((308 * x) * y^(6)) + ((1540 * x^(3)) * y^(4)) - ((924 * x^(5)) * y^(2)) + (26 * x^(6)) - (26 * y^(6)) + ((390 * x^(2)) * y^(4)) - ((390 * x^(4)) * y^(2)) + (14 * x^(5)) + ((70 * x) * y^(4)) - ((140 * x^(3)) * y^(2)) + (5 * x^(4)) + (5 * y^(4)) - ((30 * x^(2)) * y^(2)) + (2 * x^(3)) - ((6 * x) * y^(2)) + x^(2) - y^(2) + x)^(2) = 4``` 2

No, the expanded forms are equally slow (if not slower).

I can understand that the complexity increases very fast, but I was just hoping that perhaps there were ways to somehow compute the curves in some iterative fashion where each successive curve is computed based on the previous one.

But I guess the Mandelbrot doesn't work that way. Though it still seems counter-intuitive that some of the shapes contained in the innermost curve have a reasonably simple formula (like the main cardioid), while the complete innermost curve would be incredibly complex as the limit of infinitely many steps from outer to inner curves (given that you run into a wall of complexity after just 5 steps).

The innermost curve would be the line separating white from black in this image:

And it just seems to be comprised of two basic shapes (circles and cardioids) differing in orientation, size and location (where orientation only applies to cardioids and not to circles).

It makes me wonder if there is a way to generate sequences of such shapes matching patterns in that curve.

https://i.imgur.com/Ot52lqt.png 1

This screenshot provides a better example of generating a series of circles varying in size and location: https://i.imgur.com/OVxrPgF.png 1

Hmmm, after reading some more on the web it seems a bit more daunting since the circles are not really circles except for the biggest one centered at (-1,0). They are squashed ever so slightly (hard to perceive visually).

https://i.imgur.com/RcJbrnv.gif 1

Sure.. GeoGebra is not Maple..

approaching the Mandelbrot set?

approaching yes.. perhaps this file will give you some ideas..

-----------------

to do what you want, we need recursivity.. as in Python programmation

Python was implemented in GeoGebra some years ago, but it was a try and it was abandoned.. 1

I see many examples of demonstrations of the Taylor series in the online GeoGebra resources, so

I think it's not too far fetched to assume that such an approach might yield some visual approximation of the boundary of the Mandelbrot set in terms of constituent elements like (pseudo)circles and cardioids. 1

Interesting idea - you could try throwing away some terms each time before the squaring... but which ones?

My hunch is that the lower and higher ones will all be important as we need to deal with numbers near 0 and near 1  1

Here's as much as I can calculate. Good luck trying to plot the last couple :)

`(((x^2-y^2+x)^2-(2*x*y+y)^2+x)^2-(2*(x^2-y^2+x)*(2*x*y+y)+y)^2+x)^2+(2*((x^2-y^2+x)^2-(2*x*y+y)^2+x)*(2*(x^2-y^2+x)*(2*x*y+y)+y)+y)^2=4`

`((((x^2-y^2+x)^2-(2*x*y+y)^2+x)^2-(2*(x^2-y^2+x)*(2*x*y+y)+y)^2+x)^2-(2*((x^2-y^2+x)^2-(2*x*y+y)^2+x)*(2*(x^2-y^2+x)*(2*x*y+y)+y)+y)^2+x)^2+(2*(((x^2-y^2+x)^2-(2*x*y+y)^2+x)^2-(2*(x^2-y^2+x)*(2*x*y+y)+y)^2+x)*(2*((x^2-y^2+x)^2-(2*x*y+y)^2+x)*(2*(x^2-y^2+x)*(2*x*y+y)+y)+y)+y)^2=4`

`(((((x^2-y^2+x)^2-(2*x*y+y)^2+x)^2-(2*(x^2-y^2+x)*(2*x*y+y)+y)^2+x)^2-(2*((x^2-y^2+x)^2-(2*x*y+y)^2+x)*(2*(x^2-y^2+x)*(2*x*y+y)+y)+y)^2+x)^2-(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