Title: Plotting field lines during iteration... Post by: Chris Thomasson on February 24, 2015, 06:25:02 AM Plotting field lines during iteration...
Hello everybody! My name is Chris M. Thomasson and I am very interested in gaining a deeper understanding of fractals. This is my first post... When I first started plotting field lines on fractal points, I was literally plotting a charge per point, then running them through one of my vector field plotters in order to gain the fractals overall field, and associated perpendicular equipotential field. This required two steps. Also, I was using IFS because they more naturally support the dynamic generation of a fractal point, instead of checking to see if a given point is “valid” or not. However, during a late night of experimentation, I discovered a very simple, perhaps naive method for generating a field and equipotential plot without using an IFS. So far, it seems to be compatible with basically any escape time fractal. Here is some quick and dirty pseudo-code of the basic algorithm, where Z is the current point; ZP is the previous point; C is the constant point; I is the iteration count; N is the threshold of I, and G is the “granularity level” of the resulting “field lines”: _________________________________________________ Z = ZP = C; G = 100.0; for (I = 0; I < N; ++I) { // Mutate Z, e.g. (Z = Z^2 + C) if (Z.real() / ZP.real() > G && Z.imag() / ZP.imag() > G) { // The point C escapes. // Color using traditional methods. return; } ZP = Z; } // We assume that C does not escape. // Color using traditional methods. _________________________________________________ Divide-by-zero conditions aside for a moment, this escape condition sure seems to end up producing plots that contain detailed field lines. Here are some simple examples: (http://nocache-nocookies.digitalgott.com/gallery/17/11687_23_02_15_11_54_20.jpeg) https://plus.google.com/101799841244447089430/posts/YoktF5J94jb (https://plus.google.com/101799841244447089430/posts/YoktF5J94jb) https://plus.google.com/101799841244447089430/posts/KfEa5LR9tV3 (https://plus.google.com/101799841244447089430/posts/KfEa5LR9tV3) https://plus.google.com/101799841244447089430/posts/7kvthiEkLTq (https://plus.google.com/101799841244447089430/posts/7kvthiEkLTq) As I think this should not be anything new, I am wondering if anybody has seen this technique before? If so, could you please provide me with some references to further information? Thank you everybody: this group is simply excellent! :^) Title: Re: Plotting field lines during iteration... Post by: Adam Majewski on February 24, 2015, 03:58:17 PM Hi Chris,
Nice image. Thx for algorithm. I was not used such algorithm, but similar image can be made using : * external angle : * * http://fraktal.republika.pl/cpp_argphi.html * * http://www.fractalforums.com/programming/smooth-external-angle-of-mandelbrot-set/msg80726/#msg80726 * triangle inequality : http://www.ultrafractal.com/help/index.html?/help/coloring/standard/triangleinequalityaverage.html * decomposition of set's exterior : ** http://fraktal.republika.pl/mset_decomposition.html ** https://eudml.org/doc/232574 ** https://commons.wikimedia.org/wiki/File:Julia_IIM_6_basilica.png ** https://commons.wikimedia.org/wiki/File:Mandelbrot_d_9.png :) Title: Re: Plotting field lines during iteration... Post by: cKleinhuis on February 24, 2015, 06:01:13 PM hey, nice pic
i hope you find some inside browsing my iteration visualisations, check them out here (for the mandelbrot) http://www.fractalforums.com/index.php?action=gallery;cat=104 Title: Re: Plotting field lines during iteration... Post by: Chris Thomasson on February 25, 2015, 09:21:41 PM Thanks so much for the excellent information Adam and cKleinhuis!
I really do appreciate it. :^) IMVVVVHO: Adam, finding the arguments per-turn does work great, however, keeping a previous point and performing division of the components that make up the current and previous points also seems to create a "valid" vector field. IMVVVHO, the algorithm I posted is a bit simpler than solving differential equations, something like Runge-Kutta. What do you think? Is my statement here total crap? Yikes! :^o Title: Re: Plotting field lines during iteration... Post by: Chris Thomasson on February 25, 2015, 09:23:15 PM FWIW, here is a field of a Julia set using the posted algorithm:
(http://nocache-nocookies.digitalgott.com/gallery/17/11687_25_02_15_9_11_31.jpeg) Title: Re: Plotting field lines during iteration... Post by: cKleinhuis on February 25, 2015, 10:16:00 PM it looks quite interesting that filling method ;) the colors are a bit coder-colors like but the general layout is cool
Title: Re: Plotting field lines during iteration... Post by: claude on February 26, 2015, 11:19:51 AM I tried it in Fragmentarium (just hacked the different escape criteria in to the Mandelbrot example). Looks fine, until you zoom in:
Title: Re: Plotting field lines during iteration... Post by: claude on February 26, 2015, 11:36:54 AM Instead I suggest tweaking binary decomposition to make smoothly narrowing lines, here's the rough outline:
Code: float twopi = 6.283185307179586; Title: Re: Plotting field lines during iteration... Post by: Adam Majewski on February 26, 2015, 04:17:34 PM ... the algorithm I posted is a bit simpler than solving differential equations, something like Runge-Kutta. Yes. I'm not a mathematician so I can only guess that your method is approximates external angle like atom domains : http://mrob.com/pub/muency/atomdomain.html helps find exact hyperbolic domains in short time. Title: Re: Plotting field lines during iteration... Post by: Chris Thomasson on February 26, 2015, 05:59:59 PM I tried it in Fragmentarium (just hacked the different escape criteria in to the Mandelbrot example). Looks fine, until you zoom in: Thank you for giving it a go. I get the exact same glitch when the value for G is too low. In the example algorithm I posted, G is set to 100. Could you try it again with a value of 10000 or so? Those glitches should go away. I will render a couple of images, one with a glitch due to G being too small, and another with the glitches fixed because G is big enough. Title: Re: Plotting field lines during iteration... Post by: Chris Thomasson on February 26, 2015, 06:20:45 PM FWIW, here is a link to two renderings of the same location. One of them has G set to 100, which to too low for this level of zoom and ends up producing some rather unpleasant artifacts. The other rendering has G set much higher at 10000, and the glitches disappear...
Sorry about the crappy coloring here, I just quickly created these! ;^( (http://webpages.charter.net/appcore/fractal/field/image/glitch_G_100.jpg) (http://webpages.charter.net/appcore/fractal/field/image/fixed_G_10000.jpg) Title: Re: Plotting field lines during iteration... Post by: Chris Thomasson on February 27, 2015, 03:32:48 AM FWIW, here is an older rendering of mine that plots a vector field using points generated by a Julia IFS. This takes longer to compute than the field line generating escape condition I posted here.
;^) (http://nocache-nocookies.digitalgott.com/gallery/17/11687_27_02_15_3_26_25.jpeg) Title: Re: Plotting field lines during iteration... Post by: cKleinhuis on February 27, 2015, 10:44:02 AM are you aware of line integral convolution vector field visualisation?
http://de.wikipedia.org/wiki/Line_Integral_Convolution Title: Re: Plotting field lines during iteration... Post by: Chris Thomasson on February 27, 2015, 09:17:42 PM are you aware of line integral convolution vector field visualisation? http://de.wikipedia.org/wiki/Line_Integral_Convolution > are you aware of line integral convolution vector field visualisation? Not really. I know some brief aspects of the technique because I was trying to find a better way to color a high number of field lines per-point. This ends up creating a very dense plot, which could benefit from a better coloring algorithm indeed. The plot would sometimes be all pixels white, which ends up resembling a sheet of paper, not a graph. Yikes! I am wondering if I could use the escape method I posted here to visualize an arbitrary user-defined set of points. It should end up coloring each point on the plane such that the flow of the field can be observed; humm... Thank you. BTW, I managed to find a fairly interesting paper on the method: http://www.impa.br/opencms/pt/ensino/downloads/dissertacoes_de_mestrado/dissertacoes_2009/Ricardo_david_castaneda_marin.pdf (http://www.impa.br/opencms/pt/ensino/downloads/dissertacoes_de_mestrado/dissertacoes_2009/Ricardo_david_castaneda_marin.pdf) Title: Re: Plotting field lines during iteration... Post by: cKleinhuis on February 27, 2015, 10:05:35 PM cool paper, yes, line integral convolution is very mighty, i love seeing them in motion ! snapshoting a vector field and seeing its motion distribution is just cool ;)
Title: Re: Plotting field lines during iteration... Post by: Chris Thomasson on March 03, 2015, 02:28:53 AM cool paper, yes, line integral convolution is very mighty, i love seeing them in motion ! snapshoting a vector field and seeing its motion distribution is just cool ;) I agree about the paper, and the overall technique. What a great method to help an observer visualize a vector field in a given state of motion. When I get some more time, I will go ahead implement this! Thanks again for the heads up. ;^D Title: Re: Plotting field lines during iteration... Post by: claude on March 04, 2015, 10:04:51 PM I don't think increasing G will help in the long run (as you zoom deeper, I think the required G increases without bound). This is why I find the method unsatisfactory (a kind of mathematical aesthetics), even though the images look interesting.
The glitch occurs because Z can get really small sometimes, with the following Z being a more regular size. The iteration count where Z gets small can be visualized using atom domains, see the link Adam posted. Title: Re: Plotting field lines during iteration... Post by: Chris Thomasson on March 04, 2015, 11:15:44 PM I don't think increasing G will help in the long run (as you zoom deeper, I think the required G increases without bound). This is why I find the method unsatisfactory (a kind of mathematical aesthetics), even though the images look interesting. The glitch occurs because Z can get really small sometimes, with the following Z being a more regular size. The iteration count where Z gets small can be visualized using atom domains, see the link Adam posted. I think I most likely have to totally agree with you on this one. Thank you for taking a look, and actually trying it out claude. I am wondering if G can dynamically scale along with the current zoom scale. Well, now there is a problem, if you set G to the largest number its type can hold, then the escape condition would never trip, right? Humm... Well, at least this does work for some levels of zooming. Yikes! ;^o Need to think a lot more on this... Thanks again claude! :^) Title: Re: Plotting field lines during iteration... Post by: Chris Thomasson on March 04, 2015, 11:22:48 PM Humm... This is just a shot in the dark, but what if Z was a float and G was a double? Would that avoid the glitch popping its ugly artifacts out wrt zooming into the limits of a float? Damn! ;^o |