[Utility Download] 607's Mandelbrot Explorer

Discussion in 'Byte Chat' started by 607, Jan 6, 2019.

?

Have you heard about the Mandelbrot set before?

Yes. 14 vote(s) 63.6%
No. 8 vote(s) 36.4%
  1. Hi, it's me again!

    This program, originally made as a graded assignment for university, is intended to let people get acquainted with the extraordinary Mandelbrot set. The program can be used to explore the figure, and get impressed by its qualities.
    Because of the added colourations, this program can also be used to create beautiful images.
    When I was working on this assignment, I posted several teaser images in the MoreMoople Discord. However, I couldn't share it with EMC yet, as I wanted to translate the interface to English first, but, also wanting to keep the option of the Dutch interface, had to rewrite the way in which I built the interface.
    But I did it, and now I'm finally sharing this with you. :D
    The manual is included with the program.
    This program was made for Windows pcs, and it used to be not that stable, but I am expecting it to work a lot better as of version 1.4.
    In any case, you will get a warning when downloading it, that it isn't downloaded often. You can click "download anyway". Then after downloading it, when you try to run it Windows will block it, saying it might contain a virus, but it does not. Click 'More information', and then 'Run anyway'. ;)

    Download

    Please tell me about your experiences, maybe share some nice pictures, and, most importantly: give suggestions for improving the program! I've got it working fairly well now and have got some ideas to look into later, but extra suggestions, especially for new colourations, are very welcome. :D


    Pre 1.8:
    If you have your display set to scale up the GUI, this program will appear blurry. Right click on the desktop, click 'Display Settings', and change it to 100%.

    Pre 1.4:
    Some notes, though:
    This application was made for Windows operating systems.
    This application might not at all work on your pc.
    This application might hang while drawing on your pc.
    This application might be slow on your pc.
    Yeah... :D I don't think it's my fault, but this application isn't too stable! But if you have a powerful Windows pc, it should work... I think.
    I hope it works for you, and I'm sorry if it starts but then doesn't finish drawing, like it does on my own laptop and on my cousin's. On my desktop pc it works well, though, so I'm sure it will work for some of you too!
  2. ... I forgot to include what this is for. :p I've copied a bit of the manual to the OP.
    While I was editing it anyway, I also edited some colours to the text. ;)
  3. I already thought of another improvement shortly after posting the thread: middle click as a shortcut to Zoom factor = 1. The zoom factor would stay the same while you were looking around.
  4. Huh, I just realised the 'Colourations' label is missing above the list for it. That must've disappeared while rewriting the interface. :p
  5. *Accidentally stuck an extra 0 at the end of the maximum iterations*
    *program crashes*
    I guess 500,000 iterations is just a few too many :I
    607 and FadedMartian like this.
  6. Heh heh, I decided not to put an arbitrary max on that, as it depends on your computer what will be achievable. I think any amount of iterations under 1.8 * 10 ^ 308 wouldn't actually crash the program, so it was probably still calculating when you closed it. If an application doesn't allow user input or draw anything to the screen for a long time, Windows marks it as not responding, but that does not mean it has actually stopped working. ;)

    But hey, that means it works on your pc!! That's great! :D
  7. I realised that I forgot to make English versions of the errors. :p
    By the way, if you find any nice pictures, please share the values here: I might use them in upcoming colourations. Speaking of colourations: suggestions are welcome! The Dark colouration is one of my favourites, and was based on a suggestion from Rhythmically.
  8. Multi-threading would help a lot with that, would prevent the program from hanging. Then you can just let the user know "hey this process is still running" and possibly even give a progress bar :p

    This looks nice though from the pictures/description, I'll have to download it and see how it works :D
    Lukas3226, MoreMoople and 607 like this.
  9. That sounds good! I'll ask about that and/or do some searches for it on the internet. :)
    There is a progress indication already, as every pixel that gets calculated is drawn immediately. ;) 500000 is simply way too much. I think the highest I tried was 20000.
  10. Did you write your own calculation function or are you using a built-in one? Because, since mandlebrot is calculated through iterations, you could optimize for multiple lookups by caching values into a table.

    i.e. The first time mandlebrot(x) is needed, calculate it and store the result in a table. Later when mandlebrot(x) is needed again just retrieve the number from the table. If you need to generate mandlebrot(x+1), retrieve mandlebrot(x) and add just one iteration.

    Seems like it should be able to generate millions of iterations very quickly.
    607 likes this.
  11. I used the built-in functions Pow and Sqrt only. Your idea sounded interesting, but when I read it again I don't follow. What do you mean by mandelbrot(x)? There are always x and y, not just x. It's also very unlikely I'll ever need to generate x+1 of anything. Or maybe with x you mean the maximum number of iterations? In any case, as you'll be moving around the picture and doing lots of zooming in, it's very unlikely the program will ever need to recalculate the same values, unless you load an 'accompanying example', are just scrolling, or are just modifying the maximum number of iterations.
  12. I was going from the definition of the mandlebrot set and thought you were plotting the value after N iterations. When I wrote mandlebrot(x) I meant "x iterations". It seemed like if the program were repeating calculations then those could be reused with a custom cache.

    But I see now that the image isn't rendering the value of the equation, but is instead plotting a color for when the number exceeds some range. i.e. Perform up to x iterations, count how many iterations were required until the value exceeded 2.0 or -2.0.

    It uses X/Y pixel coordinates to define different starting points for the common equation. Since the starting point changes for each pixel then yeah, reusing values from other pixels is probably not going to work. Those starting points do not (easily) lead to overlapping calculations.
    607 likes this.
  13. Exactly. :)
  14. Definitely what a virus would say :D jk
    Multi-Threading would indeed help. Not only for the user interface and progress bar, but also for the computing. The mandelbrot set can be parallized very well which would decrease the runtime and allow a higher maximum.
  15. Didn't anyone find a nice place?
    Edit: Lol, I wanted to add new functionality but then I realised it was already in place. I wanted to add the ability to middle-click to look around, but that already became a possibility when I added the ability to right-click to zoom out. :p So I'll just add it to the manual.
  16. Yesterday, this program was updated to version 1.4! I was planning for this release to implement muiltithreading, but I wasn't (yet) able to figure that out. However, in the process of trying, I did manage to make the drawing go roughly five times as fast!! :eek: So if you've tried it out before but it didn't work, or was too slow, do try again! It's a lot nicer to work with, now! :)
    This version also marks the release of the rainbow theme!


    This picture isn't in perfect quality: download the program and load Rainbow's accompanying example to see it for yourself! (and look around to maybe find even more amazing sights!)
    A planned feature for a future update is being able to save the pictures from the program, so you won't have to deal with the screenshot-taking anymore.
    luckycordel and MoreMoople like this.
  17. I did it! I implemented multithreading! :D

    Look forward to the next release. ;)
  18. Mandelbrot Explorer 1.5 has been released!
    It includes multi-threading, to make the program even faster, and enable Rhy to fix the mistake of adding that extra '0' without restarting the program! ;)
    Also included is yet another new theme, based on the three primary colours of light: red, green and blue. :) (well, technically all themes are based on that, but here it really shows :p)
    Enjoy!!
    MoreMoople and luckycordel like this.
  19. Version 1.6 has been released!
    This one has twice as many changes listed in the changelog (which is private for now) than any other updates, but most of them aren't too big. ;)
    However, do update, as I found an inefficiency in the program which made it waste CPU unnecessarily (this new version uses 2/3rds the CPU according to my calculations and tests), and I made the drawing panel scale to the window size! That means that if you don't want drawing to take a bit longer, you could even put it on full screen and have the images in high detail. ;)



    (let me know if you can't see these, they were copied from Discord without uploading to imgur)

    And of course there's a new colouration to check out. ;)
    luckycordel and MoreMoople like this.