Ags Posted June 18 Share Posted June 18 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 Link to comment Share on other sites More sharing options...
badhex Posted June 18 Share Posted June 18 1 Link to comment Share on other sites More sharing options...
Gfamily Posted June 18 Share Posted June 18 (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 June 18 by Gfamily 2 Link to comment Share on other sites More sharing options...
Ags Posted June 18 Author Share Posted June 18 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... Link to comment Share on other sites More sharing options...
Ags Posted June 18 Author Share Posted June 18 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? Link to comment Share on other sites More sharing options...
Gfamily Posted June 18 Share Posted June 18 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 Link to comment Share on other sites More sharing options...
Ags Posted June 18 Author Share Posted June 18 How can this be mathematics? It seems organic. 2 Link to comment Share on other sites More sharing options...
vlaiv Posted June 18 Share Posted June 18 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 Link to comment Share on other sites More sharing options...
Ags Posted June 18 Author Share Posted June 18 It's life Jim, but not as we know it. 3 Link to comment Share on other sites More sharing options...
Ags Posted July 4 Author Share Posted July 4 We have isolated the Anomaly. 1 Link to comment Share on other sites More sharing options...
Paul M Posted July 4 Share Posted July 4 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 Link to comment Share on other sites More sharing options...
saac Posted July 4 Share Posted July 4 Those images are trippy Jim 1 Link to comment Share on other sites More sharing options...
Ags Posted July 4 Author Share Posted July 4 13 minutes ago, saac said: Those images are trippy Jim Who needs narcotics when you can just do maths? 1 1 Link to comment Share on other sites More sharing options...
Emperor!Takahashi! Posted July 4 Share Posted July 4 No idea what it is but I love it. Well done. 1 Link to comment Share on other sites More sharing options...
Ags Posted July 4 Author Share Posted July 4 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 Link to comment Share on other sites More sharing options...
Ags Posted July 5 Author Share Posted July 5 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?" Link to comment Share on other sites More sharing options...
ollypenrice Posted July 5 Share Posted July 5 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 Link to comment Share on other sites More sharing options...
Ags Posted July 5 Author Share Posted July 5 New color scheme. 5 Link to comment Share on other sites More sharing options...
Vroobel Posted July 6 Share Posted July 6 Beautiful! Looks like a thunderstorm at night. 🤩 1 Link to comment Share on other sites More sharing options...
Xilman Posted July 6 Share Posted July 6 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 Link to comment Share on other sites More sharing options...
Mognet Posted July 6 Share Posted July 6 I found Xaos a while back. Wasted quite a few hours zooming in and out! https://xaos-project.github.io/ Link to comment Share on other sites More sharing options...
Ags Posted July 7 Author Share Posted July 7 (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 July 7 by Ags 2 Link to comment Share on other sites More sharing options...
MalcolmP Posted July 7 Share Posted July 7 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. Link to comment Share on other sites More sharing options...
Ags Posted July 8 Author Share Posted July 8 (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 July 8 by Ags 1 Link to comment Share on other sites More sharing options...
MalcolmP Posted July 8 Share Posted July 8 Brilliant ! 👍 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now