• How to make a Mandelbrot Set?
    88 replies, posted
Hi. I am friends with this girl who loves art. I thought she would be interested in seeing a Mandelbrot set, but I would like to have one running on her computer. I have no clue where to start with this though :P I know you guys are good with this shit, so I came to you guys first :D!
I think what you're trying to refer to is a fractal. [editline]11:00PM[/editline] Anyway, I guess you could try this: [url]http://www.chaospro.de/[/url] Extensive, and kind of complicated, but it can produce some cool shit
[QUOTE=Aurora93;20410018]I think what you're trying to refer to is a fractal. [editline]11:00PM[/editline] Anyway, I guess you could try this: [url]http://www.chaospro.de/[/url] Extensive, and kind of complicated, but it can produce some cool shit[/QUOTE] Yeah. A fractal zoom mandelbrot set. Like this: [img]http://upload.wikimedia.org/wikipedia/commons/a/a4/Mandelbrot_sequence_new.gif[/img]
I saw something like this done in Silverlight while I was looking at it for work. I'll see if I can find it for you. [editline]05:12AM[/editline] [url=http://silverlight.services.live.com/invoke/104555/Fractal%20Fun/iframe.html]Here's the link[/url], but it seems to be down at the moment. So not use right now, but hopefully when it's up again it'll suit your needs.
[QUOTE=i300;20410102][img]http://upload.wikimedia.org/wikipedia/commons/a/a4/Mandelbrot_sequence_new.gif[/img][/QUOTE] Woah, trippy
[QUOTE=windwakr;20410533]I don't understand. Are you making a program, or do you just want someone to find you one? I'll just assume that since this is in the programming forum you want to make your own: [url]http://en.wikipedia.org/wiki/Mandelbrot_set[/url] [url]http://plus.maths.org/issue9/features/mandelbrot/[/url] [url]http://www.cygnus-software.com/theory/theory.htm[/url] [url]http://classes.yale.edu/Fractals/MandelSet/welcome.html[/url] I found these two links the most helpful for me: [url]http://warp.povusers.org/Mandelbrot/[/url] [url]http://reocities.com/CapeCanaveral/5003/fracgubb.htm[/url] The Mandelbrot set is fairly easy to understand. Look what I just made in one sitting early today: [url]http://www.facepunch.com/showpost.php?p=20408952&postcount=107[/url][/QUOTE] This helps. Thanks!
[Img]http://filesmelt.com/dl/MandelFuck.png[/img] Woops
Looking at fractals makes me feel uneasy.
If you want a free one that's easy(ish) to use, try [url=http://wmi.math.u-szeged.hu/xaos/doku.php]Xaos[/url].
[QUOTE=windwakr;20421879]Oh, and here's another useful tutorial: [URL]http://filesmelt.com/dl/archived_site.zip[/URL] Well, it's an entire website. I archived it a few years ago when I used Dialup and couldn't sit online all day. The actual site is down now, so it's a good thing I had it archived. All sorts of useful shit in it. My Mandelbrot is mainly based off the tutorial on that site. Although, I optimized a few things and use better coloring.[/QUOTE] Oh Hayy I know that website :v: I still use QuickCG [editline]12:36PM[/editline] I can't use the code in that one, it doesn't work D: [code] 1>main.obj : error LNK2019: unresolved external symbol "void __cdecl sleep(void)" (?sleep@@YAXXZ) referenced in function _SDL_main[/code]
[QUOTE=windwakr;20421879]Oh, and here's another useful tutorial: [url]http://filesmelt.com/dl/archived_site.zip[/url] Well, it's an entire website. I archived it a few years ago when I used Dialup and couldn't sit online all day. The actual site is down now, so it's a good thing I had it archived. All sorts of useful shit in it. My Mandelbrot is mainly based off the tutorial on that site. Although, I optimized a few things and use better coloring.[/QUOTE] Thank you! I used that site for a tutorial a few years ago, and I've been trying to find it for a long time now. Didn't realize it was down.
What a coincidence, I started coding mine this morning. Looking forward to your results.
Could it be possible to zoom with the mouse? Kinda like, draw a box around the area that it is going to zoom in while left mouse button is held down (and drag around the box to change the area etc), and zoom into that area when the button is released.
[QUOTE=DrLuke;20438907]Could it be possible to zoom with the mouse? Kinda like, draw a box around the area that it is going to zoom in while left mouse button is held down (and drag around the box to change the area etc), and zoom into that area when the button is released.[/QUOTE] I dunno if you guys missed it or something, but that's exactly what my mandelbrot program does, and it's fully open source: [url]http://filesmelt.com/dl/mandelbrot_v1.zip[/url] [img]http://img535.imageshack.us/img535/5756/screeny.png[/img]
[media]http://www.youtube.com/watch?v=ES-yKOYaXq0[/media] You'll find this instructive.
[QUOTE=windwakr;20439407]Why don't you do any main bulb or cardoid checking? When viewing the full set, or close to either of those objects, you can get a huge speedup at pretty much no extra cost when they're not found(less than the computational cost of a single iteration).[/QUOTE] Because I don't zoom into those areas; not worth the effort to optimize something that I barely ever look at. Besides, viewing the full set runs in real-time even without those optimizations.
Who wants to see me do this on iPhone :smug: [editline]4:40[/editline] This might get me honors in math if i do. I'm in algebra.
[QUOTE=windwakr;20439407] Why use HSV coloring? That's more ugly than my ugly coloring. [/quote] HSV = free gradient. I don't think it's ugly at all, but whatever floats your boat. [quote] Your code is also very unoptimized and slow.[/QUOTE] Did you actually try it? It runs in real-time for me. At least until you get into the deep zooming levels, in which case your optimizations for the main part of the set don't apply. [editline]08:55PM[/editline] In fact my working version has cache-hit optimizations for the pixel access. [editline]08:57PM[/editline] I'd love to hear your ideas though.
[QUOTE=windwakr;20439407] Lies. You already said you weren't interested in optimizing it. Welcome to my ignore list, troll.[/QUOTE] LOL, yeah, OK. Your loss.
Hey guys, I'm new to anything not-Java/Assembly, so I was wondering what C++ tools are you guys using to make your Mandelbrots? I have a Java dual application/applet version, but Java, in general, is kinda meh in terms of graphics. So, I was thinking about translating it into a more useful language (C++) via. translating my original Mandelbrot code. Pretty much the question is, what do you guys suggest for IDEs, tools etc.? Also, how does C++ handle multithreading? Thanks, not sure if I should have posted it in this thread or a new one.
[QUOTE=Hak;20484597] Pretty much the question is, what do you guys suggest for IDEs, tools etc.? [/quote] I use Microsoft Visual C++. The Express Edition is completely free and has pretty much all of the Professional version features, so go get it. [quote]Also, how does C++ handle multithreading?[/quote] It doesn't. You need 3rd party support, such as OpenMP or boost.
Well that's kind of sad not having inherent mutlithreading... How about listeners? Does C++ have them?
[QUOTE=Hak;20484933]Well that's kind of sad not having inherent mutlithreading... How about listeners? Does C++ have them?[/QUOTE] Listeners for what? If you need a listener for something you can code it; it's not a language feature.
It is in Java (Actionlistener, Keylistener, Mouselistener etc.)
[QUOTE=nullsquared;20484767]I use Microsoft Visual C++. The Express Edition is completely free and has pretty much all of the Professional version features, so go get it. It doesn't. You need 3rd party support, such as OpenMP or boost.[/QUOTE] If you're already using Visual C++ you could use .NET's multi-threading..
[QUOTE=windwakr;20486409] [code]invoke CreateThread,NULL,0,threadproc,passin,0,NULL[/code][/QUOTE] That's not assembly...
[QUOTE=arienh4;20486745]If you're already using Visual C++ you could use .NET's multi-threading..[/QUOTE] I meant the IDE, not C++.NET. That shit is horrible, just using C# :v: [editline]06:21AM[/editline] [QUOTE=Hak;20485875]It is in Java (Actionlistener, Keylistener, Mouselistener etc.)[/QUOTE] No; those are part of the standard library. More in depth, those are part of Swing, the GUI component. C++ doesn't have any GUI component, so things like KeyListener and MouseListener depend on what you use to make your GUI.
He's thinking about coding in C++, why would he fuck around with assembly when he could just call the functions directly?
[QUOTE=Hak;20484933]Well that's kind of sad not having inherent mutlithreading... How about listeners? Does C++ have them?[/QUOTE] "Kind of sad" is a rather patronising comment. C++ is a very different language to Java, and anyway, threads are not an inherent part of the Java [b] language[/b], as far I can remember. The only real difference, is that you can pick a threading library with C++ (probably boost, most of the time, but every platform will have its own specific API, and there are other options too), whereas you just use the one with one in the standard library in Java. C++ is older, closer to the silicon, and is more generally "batteries not included", as opposed to Java's "batteries included".
If someone is still looking for a tutorial about what the Madelbrot set actually is, I found this one extremely helpful: [url]http://mandelbrotset.net/tutorial.html[/url]
Sorry, you need to Log In to post a reply to this thread.