I did the Brot

Recommended Posts

I was toying with the HTML <canvas> element and finally got round to drawing a Mandlebrot set. I wanted to make it infinitely zoomable, but I discovered after zooming a million times or so, Javascript runs out of precision. I need a bigger number!

• 12

• Replies 41
• Created

Posted Images

• 1
Share on other sites

Posted (edited)

Very neat.

As you may know, the Mandelbrot set is the map of all connected Julia Sets.

Back when I started BASIC programming, I developed a MB generator, and then developed a secondary function to plot the Julia Set that corresponded to any particular point on the MB set.

It was interesting to see how the overall shape of the JS depended on where the starting point was on the MB set. After a while you could tell where to start if you wanted JSs that had 2 main branches, or 3 branches, or 4 or more.

Some interesting findings.

If I was a born mathematician I'd probably have been able to make something of it - though more likely, I'd have found it was a well known thing in the field.

Now I'm retired I must try to recreate the programme.

Edited by Gfamily
• 2
Share on other sites

9 minutes ago, Gfamily said:

As you may know, the Mandelbrot set is the map of all connected Julia Sets.

All I know is its maths, its infinitely complex, and it's on my screen 🫠

This is actually stage zero of a web based image processing idea I have. Now that I can draw Mandelbrot, I can draw the contents of a FITS file...

Share on other sites

15 minutes ago, Gfamily said:

As you may know, the Mandelbrot set is the map of all connected Julia Sets.

Thinking about it, how can sets be "connected"? If two sets are connected aren't they just one set?

Share on other sites

2 minutes ago, Ags said:

Thinking about it, how can sets be "connected"? If two sets are connected aren't they just one set?

A Julia Set is a set of points on a plane surface. If every point in the set  is adjacent to another point in the set, so they form a single area on the surface, rather than having separate islands, it's said to be connected.

• 1
Share on other sites

How can this be mathematics? It seems organic.

• 2
Share on other sites

Mandelbrot set is best understood as:

Set of all points c in complex plane that have following property:

Let z_sub_n = z_sub_n-1^2 + c

which is iterative formula. If we start with z_0 = 0 - we never leave unit circle - or module of any such iteration stays below 1 (up to infinity).

In Mandelbrot set - c has coordinates of point we want to examine - if it belongs to set or not.

Julia set on the other hand has the same exact iterative formula

z_sub_n = z_sub_n-1^2 + c

and it is used to define a set of points on complex plane by the same criteria - except, here c is constant so we can have say Julia set for c=0.2 or c=0.5-0.3i (any complex number), but starting z or z_0 is coordinate of point we examine.

These sets are related and have similar fractal properties - but different thing is used to determine if point belongs to set or not. There is single Mandelbrot set, but there are infinitely many Julia sets - one for each constant c.

• 3
• 1
Share on other sites

It's life Jim, but not as we know it.

• 3
Share on other sites

• 3 weeks later...

We have isolated the Anomaly.

• 1
Share on other sites

Back in the 90's I read a book "Chaos" by James Gleik, It was eye opener to me and included Mandelbrot's original algorithm. I wrote a program in BASIC on my  BBC micro model B. It took days to run a deep ( highly "magnified") iteration. Just a few line of code opened a whole universe to me.

What' not to like about the Beetle?

• 3
Share on other sites

Those images are trippy

Jim

• 1
Share on other sites

13 minutes ago, saac said:

Those images are trippy

Jim

Who needs narcotics when you can just do maths?

• 1
• 1
Share on other sites

No idea what it is but I love it. Well done.

• 1
Share on other sites

I am staying up watching current events, and trying to add a user interface to this, so people can play with it, setting colors, animations and zoom levels. I want it infinitely zoomable but it hits the limits of javascript maths. I'll try use a BigDecimal library to see if I can got to higher zoom levels, to better create the illusion of infinity. But it's getting a bit late and my head is getting foggy

Share on other sites

I have been thinking why it looks so organic. Perhaps I have it the wrong way round. The question is not "why does this fractal looks organic?", rather it is "are there any fractals that don't look organic to humans?"

Share on other sites

On 18/06/2024 at 22:35, Ags said:

How can this be mathematics? It seems organic.

Mathematics describes nature. Could a Mandlebrot set not look organic?

Olly

Share on other sites

New color scheme.

• 5
Share on other sites

Beautiful! Looks like a thunderstorm at night. 🤩

• 1
Share on other sites

I discovered FRACTINT back in the days when my computer ran MS-DOG as its only operating system. I'm pleased to find that it still exists and has been ported to Linux.

• 1
Share on other sites

I found Xaos a while back. Wasted quite a few hours zooming in and out! https://xaos-project.github.io/

Share on other sites

Posted (edited)

Xaos is very nice, I think they are using upsampling and GPU acceleration. I added multithreading to my script today but it is still a slideshow. Xaos gave me an idea for pseudorandomised colors, which I have now implemented.

It looks like I can zoom in about 50 times, with each zoom doubling the magnification. That's a million billion zoom!  (Unless I've got my zoom ratio wrong...)

Edited by Ags
• 2
Share on other sites

On 06/07/2024 at 16:58, Xilman said:

I discovered FRACTINT back in the days when my computer ran MS-DOG as its only operating system. I'm pleased to find that it still exists and has been ported to Linux.

Ah FRACTINT (all caps.) that takes me back a few years It was quite a while before it (and I ) caught up with windoze let alone Linux !

50 minutes ago, Ags said:

pseudorandomised colors,

I love finding miniBrots and how their symmetry falls lopsided depending !

On your hint of html<canvas> I have been googling a few versions and they are quite interesting (and surprisingly nippy for in-browser use) but all disappointingly pale at deep zooms.. Hope your new randomized colours works out good.

Share on other sites

Posted (edited)
15 hours ago, MalcolmP said:

On your hint of html<canvas> I have been googling a few versions and they are quite interesting (and surprisingly nippy for in-browser use) but all disappointingly pale at deep zooms.. Hope your new randomized colours works out good.

bright enough for you?

I am trying to upload the beta version to my website at https://discovering-astronomy.eu but having issues with Google Cloud saying no.

Edited by Ags
• 1

Brilliant ! 👍

Create an account

Register a new account