Title: Collatz fractal Post by: claude on April 10, 2016, 11:54:06 PM (http://mathr.co.uk/misc/2016-04-10_collatz-0.png)
(http://mathr.co.uk/misc/2016-04-10_collatz-1.png) (http://mathr.co.uk/misc/2016-04-10_collatz-2.png) Title: Re: Collatz fractal Post by: zebastian on April 11, 2016, 05:45:27 PM really nice, claude.
from your code https://mathr.co.uk/blog/2016-04-10_collatz_fractal.html i was able to generalize the formula to 3d with good distance estimation, this is the formula in mandelbulber: void CollatzIteration(CVector3 &z, sExtendedAux &aux) { CVector3 xV(1.0, 1.0, 1.0); z = xV + 4.0 * z - CVector3(xV + 2.0 * z) * z.RotateAroundVectorByAngle(xV, M_PI); z /= 4.0; aux.DE = aux.DE * 4.0 + 1.0; } attached images are all the same object from different points of view. Title: Re: Collatz fractal Post by: Crist-JRoger on April 12, 2016, 10:19:05 AM Nice fractal, claude :)
void CollatzIteration(CVector3 &z, sExtendedAux &aux) Nice shape!{ CVector3 xV(1.0, 1.0, 1.0); z = xV + 4.0 * z - CVector3(xV + 2.0 * z) * z.RotateAroundVectorByAngle(xV, M_PI); z /= 4.0; aux.DE = aux.DE * 4.0 + 1.0; } Is that possible to adapt this code for Fragmentarium? Title: Re: Collatz fractal Post by: mclarekin on April 12, 2016, 10:24:56 AM with Add Cpixel. Step multiplier a slow .01
Title: Re: Collatz fractal Post by: zebastian on April 12, 2016, 02:03:56 PM @Crist-JRoger
>> Is that possible to adapt this code for Fragmentarium? Yes, should be adoptable. The vector arithmetic should be mostly self explaining, you can find the implementation here: https://github.com/buddhi1980/mandelbulber2/blob/master/mandelbulber2/src/algebra.cpp https://github.com/buddhi1980/mandelbulber2/blob/master/mandelbulber2/src/algebra.cpp All changes made to mandelbulber for adding Collatz iteration you can find here: https://github.com/buddhi1980/mandelbulber2/commit/50097e6added17a3af5faafee21948178f281349 most importantly are the changes to compute_fractal.cpp. If you start the fractal in fragmentarium you are probably best of starting with a menger sponge and adopting the ray marching function to something like the CollatzIteration. ray marching step multiplier should be down to 0.1 or even lower. otherwise the fractal starts to disappear from the outside in. Let me know, if you have any questions about that. @mclarekin: cool image! its hard to get a low DE miss with this formular. also nice coloring. ;D cheers! Title: Re: Collatz fractal Post by: laser blaster on April 14, 2016, 04:14:21 PM (I have to put something here so the forum doesn't reject this as a duplicate post... )
This is really cool! I've seen this fractal before, but the use of DE coloring almost made me not recognize it at first - it really brings out all the details. Anyway, I realized that you could change the constants in the formula to make a whole family of Julia sets based on this formula. There are 4 complex constants in the formula, so that makes an 8-dimensional parameter space (the "/4" at the end of the formula is technically another constant, but it's redundant with the others). Next up would be to make a Mandelbrot set for this formula, however to render it properly I'd need to derive the critical points ( I think the sin/cos based fractals have an infinite no. of critical points and are therefore hard to render properly, but I think there's a trick to it. I read some pdf's on it a long time ago, I'll see what I can dig up). Title: Re: Collatz fractal Post by: laser blaster on April 14, 2016, 04:16:36 PM Another screenie.
I'll post the .frag file, but first I need to down-convert it back to single precision. I converted it to emulated double precision for deeper zooms, but it's slow, relies on 2 custom include files, and requires a newer GPU as I use the fma function for faster emulated double multiplication. So I think my high-precision version would be more trouble than it's worth for most of you. But I'll be happy to share if you want it. Title: Re: Collatz fractal Post by: laser blaster on April 14, 2016, 04:34:24 PM Two more!
Title: Re: Collatz fractal Post by: claude on April 14, 2016, 06:04:34 PM nice!
Title: Re: Collatz fractal Post by: laser blaster on April 15, 2016, 12:46:10 AM Here's the .frag with the Julia parameters:
Title: Re: Collatz fractal Post by: mclarekin on April 15, 2016, 02:19:32 AM It would be cool if the beauty of the 2D antennae features posted by Claude could be replicated in 3D, but so far the best use of this formula in 3D that I have found, is in making hybrids. I coded variable parameters for all constants, (including /4 and Pi). This image is using the Collatz fractal as a pre-transform of 1 iteration before the menger sponge, the "Collatz parameter controls" allows for interesting manipulation of the Menger Sponge
Title: Re: Collatz fractal Post by: Mrz00m on April 15, 2016, 08:38:28 AM awesome collatz, it would be interesting to see collatz in ultrafractal or some kind of deep zoom program, and see it in color.
The menger sponge is awesome! i want to print it in 3d!!! perhaps just pring one of them, but in distorted timespace!:) Title: Re: Collatz fractal Post by: laser blaster on April 16, 2016, 12:28:14 AM I'm finding this formula really fascinating so far. Mclarekin had a good idea of replacing pi with a parameter, which gives some of the coolest variations in 2D. I've found that the most interesting shapes can be found with all real values for the parameters. Complex values can give nice results too, but often look similar to quadratic and cubic Julias which are old news. There are new and alien looking shapes things all over the parameter space, but most of them seem to be clustered near the real-valued parameters.
There's one thing really interesting I noticed - some of these Julia sets almost have a kind of shape stacking. I've been studying the default-valued set in particular. As you move out further along the main antenna, you find period doubled versions of previous shapes. Sometimes you find what looks to be two previous shapes shape-stacked together. You can't do any shape stacking by zooming in, only by moving further out along any antenna. I'm trying to figure out what the "ancestry" of each shape along the main western antenna is, along with what pattern they follow. Perhaps the ancestry path of each integer-centered body along the real line corresponds to the path taken by it's central point when iterated under the Collatz function? Just speculation so far. Anyway, this fractal is cool. I hope to see some pictures from more talented explorers. Title: Re: Collatz fractal Post by: stardust4ever on April 16, 2016, 07:39:41 AM I've been fascinated on and off for some time by the Collatz postulate, with how every positive integer always reverts back to a 4-2-1 loop, no matter what. And if you allow negatives, there are a finite number of additional known loops. Some particularly hard numbers grow to quite impressively high values before eventually regressing to the aformentioned 4-2-1 loop.
I'm more interested in this unique fractal and any hidden details it may hold at higher values. Is it Mandelbrot-like increasing complexity or relative sameness? I've seen a few renders but I don't understand how it is calculated. If it uses trig, then an arbirary precision library for it would be bog-slow compared to deep-zoom Mandelbrots. Also is there a plugin for UF5? I own a basic license for Ultra Fractal but haven't done much with it in the past several years since I got obsessed with deep zoom fractal exploration, and my second and third order abs() fractal sets got incorporated into Fractal Extreme plugins and Kalles Fraktaler. UF5 is far too slow for doing any arbitrary deep zoom stuff. O0 Edit: No trig at all! I just read the following writeup which is quite fascinating: http://jlpe.tripod.com/collatz/cfractal.pdf (http://jlpe.tripod.com/collatz/cfractal.pdf) It does require a complex abs() necessitating the square root function which would complicate arbitrary precision zooming. The Collatz fractal has two different versions based upon whether it uses the ceiling or floor of the complex absolute value to determine evenness or oddity, and computes the result based on whether the fractal eventually converges on 4-2-1 or escapes without bound. And I suppose one could develop an exterior coloring technique based on how quickly it escapes to some arbitrarily large bailout, or internally based upon how long slowly it converges on 4-2-1. This might make the boundary of the set highly ornate, even in monochrome, with fractal details on both edges of the curve if both inner and outer coloring methods are employed. Title: Re: Collatz fractal Post by: claude on April 16, 2016, 01:03:03 PM Edit: No trig at all! I just read the following writeup which is quite fascinating: http://jlpe.tripod.com/collatz/cfractal.pdf (http://jlpe.tripod.com/collatz/cfractal.pdf) That's a different Collatz fractal, I copied the one from Wikipedia which does have trig ( https://en.wikipedia.org/wiki/Collatz_conjecture#Iterating_on_real_or_complex_numbers ). I tried a quaternion implementation too (copying the cos() function from Boost), but didn't get anything interesting-looking. Title: Re: Collatz fractal Post by: Crist-JRoger on May 04, 2016, 04:37:57 PM @Crist-JRoger Unfortunately I am not strong in math and programming, too. With difficulty turned out to make the Gnarl3D according to the DarkBeam's formula ;D>> Is that possible to adapt this code for Fragmentarium? Yes, should be adoptable. The vector arithmetic should be mostly self explaining, you can find the implementation here: https://github.com/buddhi1980/mandelbulber2/blob/master/mandelbulber2/src/algebra.cpp https://github.com/buddhi1980/mandelbulber2/blob/master/mandelbulber2/src/algebra.cpp All changes made to mandelbulber for adding Collatz iteration you can find here: https://github.com/buddhi1980/mandelbulber2/commit/50097e6added17a3af5faafee21948178f281349 most importantly are the changes to compute_fractal.cpp. If you start the fractal in fragmentarium you are probably best of starting with a menger sponge and adopting the ray marching function to something like the CollatzIteration. ray marching step multiplier should be down to 0.1 or even lower. otherwise the fractal starts to disappear from the outside in. Let me know, if you have any questions about that. @mclarekin: cool image! its hard to get a low DE miss with this formular. also nice coloring. ;D cheers! So, I tried to make orbittrap like MandelbrotOrbitTrap.frag. The code is horrible, I will try do do best. (http://orig00.deviantart.net/404a/f/2016/125/8/c/collatz_test1_by_crist_jroger-da1dom6.jpg) Title: Re: Collatz fractal Post by: stardust4ever on May 05, 2016, 12:10:28 AM Unfortunately I am not strong in math and programming, too. With difficulty turned out to make the Gnarl3D according to the DarkBeam's formula ;D Looking good regardless.So, I tried to make orbittrap like MandelbrotOrbitTrap.frag. The code is horrible, I will try do do best. (http://orig00.deviantart.net/404a/f/2016/125/8/c/collatz_test1_by_crist_jroger-da1dom6.jpg) :thumbsup1: Trig functions are particularly nasty, and any arbitrary precision implementation will be slow as balls because calculating irrational functions to arbitrary precision levels is itself an iterative function. Every arbitrary calculation of said function will require multiple passes per calculation to generate an accurate result. Repeated every iteration, plodding on beyond the limits of float point maths would be extremely time consuming. Still, a generalized fast floats implementation would have some interesting features to explore nonetheless. There is an entry for Collatz in the Ultrafractal public database if anybody owns a license and is still using it. Arbitrary precision libraries are snail slow in UF but at least it's something. Title: Re: Collatz fractal Post by: Crist-JRoger on May 05, 2016, 11:11:07 AM Looking good regardless. Thank you! :)I am fractal maker, not a programmer. So I try to change quality of visualization as much as I can without deeply knowledge of GLSL :dink: |