Here is another version of the Collatz fractal using complex numbers. I found some images on this link and a simpler formula than the one on Wikipedia (both give the same image though): https://yozh.org/2012/01/12/the_collatz_fractal/ Here is the PAR: Collatz2 { ; Exported from Fracton. reset=2004 type=formula formulafile=fracton.frm formulaname=F_20211202_1537 passes=1 float=y center-mag=0/0/0.3809523857142857/1/0/0 params=0/0/0/0/0/0/0/0/0/0 maxiter=1000 inside=1 proximity=0 colors=000FLQQvgz`6`KP1vWH1zpVDeg86Zw`_w4hpK7pGHze\ pdkSSP8ZQj5HMDPjRg`CG6RtBZ8Re_jOCrWSUAGRKbetEe`DdF\ NJPhm_f9XSn`ehRV5g1WdcfHO8ryINGfDR1hE3KpG`ZfoqpnKT\ gXD_0ys7ZP7EnbS2ssyO`uCz4UuAhCWvvB0NGZiXnWL3rhl`_p\ PGVG5Jn0HGN6IIuCEqxRMQSCrHziJSMy08YJZ_P_tu94idZBBY\ 9`5LYhHYmTYxL`T7k79IqpR9PhG3aZNgK`AHRbjerpMRLhZ4gH\ GTNl57UigYV_NE_affhn7joo05yIDWQxEVQfnGkqH5WJxmSLeS\ GVqzJUC9c3VfVyEGlC89cyabbd2h27zwDE5sywwkQ_dX2cN5TH\ EaYzfzaLb2wnTxxtZ5VRh1HFzfcrbkiEwdrvs30wtYJqjkBgeR\ YFMzpH2XRBqWAdkU5q1a8pAciLP2n9U0ni3gZjR63cp2YXjXcu\ FN2GtWNpuz08b51LU6dWv9esETy5fPzO81_Ef0sZaDIoT7vba6\ 3JT8uBZPmwvucYcFKbGfUHhlLkvlFAp`Xd5E2KHsb3Z76m5ad9\ WonMODBkdxjdyNYtzIfgfQKdDErbFehLRN7gcV30pjDqCFOGXs\ 7J1x2KCeVZCvNXDz8oN3VzOQQa3v4jAJ2dPuB0U4XFVrJv954o\ PlI_oSCoY7ODXVhrm8RvcIYP2rwYdhgNQyWtKXMVzRuLNAtf5w\ heuN6l6JUDLdJeyUSRdZjg9Uy } frm:F_20211202_1537 { ; Collatz fractal z=pixel: ; Wikipedia formula commented out but gives same result ;cz = cos(z * pi / 2); ;sz = sin(z * pi / 2); ;z = (z / 2) * cz * cz + sz * sz * (3 * z + 1); z=(2+7*z-(2+5*z)*cos(pi*z))/4, |z|<100 } -- Mike Frazier www.fracton.org
Mike,
Here is another version of the Collatz fractal using complex numbers. I found some images on this link and a simpler formula than the one on Wikipedia (both give the same image though):
frm:F_20211202_1537 { ; Collatz fractal z=pixel: ; Wikipedia formula commented out but gives same result ;cz = cos(z * pi / 2); ;sz = sin(z * pi / 2); ;z = (z / 2) * cz * cz + sz * sz * (3 * z + 1); z=(2+7*z-(2+5*z)*cos(pi*z))/4,
z|<100 }
I compared the image the "simplified" formula creates to the original formula, and get different images. Collatz [float=yes]{ ; Collatz fractal z = pixel hlfpi = PI * 0.5 : Zhlfpi = z * hlfpi z = 0.5 * ( z * sqr(cos(Zhlfpi)) + (3 * z + 1) * sqr(sin(Zhlfpi))) |z| < 100 } Not sure of the original purpose of the simplification. The unsimplified formula creates an image that looks more like the image on the wiki page that David referenced. Jonathan
I got the same images for both the Wikipedia and yozh formulas. I do see a slight difference in the Wikipedia formula I used and yours. Mine: ;cz = cos(z * pi / 2); ;sz = sin(z * pi / 2); ;z = (z / 2) * cz * cz + sz * sz * (3 * z + 1); Yours: hlfpi = PI * 0.5 Zhlfpi = z * hlfpi z = 0.5 * ( z * sqr(cos(Zhlfpi)) + (3 * z + 1) * sqr(sin(Zhlfpi))) Shouldn't that 0.5 apply only to the first term, not the whole equation like: z = (0.5 * z * sqr(cos(Zhlfpi)) + (3 * z + 1) * sqr(sin(Zhlfpi))) If anyone would like, I can make an exploration page for this fractal with images and a forum discussion area. I have something like that setup on the Fracton website for some other fractals already. It would only take a few hours to set it up. -- Mike Frazier www.fracton.org
I went back and looked at the Wikipedia page and it turns out there are two forms of the equation. Jonathan did the shortcut method and I did the non-shortcut method. Both are valid but generate a different fractal. -- Mike Frazier www.fracton.org
Mike,
I got the same images for both the Wikipedia and yozh formulas. I do see a slight difference in the Wikipedia formula I used and yours.
Mine: ;cz = cos(z * pi / 2); ;sz = sin(z * pi / 2); ;z = (z / 2) * cz * cz + sz * sz * (3 * z + 1);
Yours: hlfpi = PI * 0.5 Zhlfpi = z * hlfpi z = 0.5 * ( z * sqr(cos(Zhlfpi)) + (3 * z + 1) * sqr(sin(Zhlfpi)))
Shouldn't that 0.5 apply only to the first term, not the whole equation like:
z = (0.5 * z * sqr(cos(Zhlfpi)) + (3 * z + 1) * sqr(sin(Zhlfpi)))
The wiki page referred to by David uses (3 * z + 1) / 2. With the statement that this yields smaller values for the stopping time without changing the overall dynamics of the process. Clearly, it generates a different image. Using your version makes sense to me.
If anyone would like, I can make an exploration page for this fractal with images and a forum discussion area. I have something like that setup on the Fracton website for some other fractals already. It would only take a few hours to set it up.
Sure, that sounds good. collatz-potential { Jonathan Osuch reset=2050 type=formula formulafile=collatz.frm formulaname=Collatz center-mag=0.498123/-0.00125209/9.180077 float=y maxiter=1000 inside=0 potential=256/100/100 colors=000_2t<4>b1qc1qd0p<14>n0fo0ep0e<9>u3Yu3Xv3W<10>y8Oy9NzAM<14>zJCzK\ BzLBzMAzMA<6>xS6wT5wT5wU5<5>tZ2t_2s_2s`2ra1<16>hm0gn0fn0eo0ep0<9>Yu3Xu3W\ v3<10>Oy8Ny9MzA<14>CzJBzKBzLAzMAzM<6>6xS5wT5wT5wU<5>2tZ2t_2s_2s`1ra<16>0\ hm0gn0fn0eo0ep<9>3Yu3Xu3Wv<10>8Oy9NyAMz<14>JCzKBzLBzMAzMAz<6>S6xT5wT5wU5\ w<5>Z2t } frm:Collatz [float=yes]{ ; Collatz fractal z = pixel hlfpi = PI * 0.5 : Zhlfpi = z * hlfpi z = 0.5 * z * sqr(cos(Zhlfpi)) + (3 * z + 1) * sqr(sin(Zhlfpi)) |z| < 100 } Jonathan
I set up an exploration page for the Collatz fractal and posted the first image. You can see the page by going to the Fracton Exploration page here: http://www.fracton.org/exploration/index.html Then click on Collatz 2D. The page uses the Discus forum software. You can comment or upload your own images. In order to comment you must have a Discus account and have cookies enabled. If you only wish to view the page you don't need a Discus account or cookies. If you want your parameter file included in the downloadable files, zip it and then email it to: fractonorg@gmail.com There should be additional images and information posted in the next few days. -- Mike Frazier www.fracton.org
Amazing and beautiful!
On Dec 14, 2021, at 5:35 PM, Mike Frazier <fractonorg@gmail.com> wrote:
I set up an exploration page for the Collatz fractal and posted the first image. You can see the page by going to the Fracton Exploration page here:
http://www.fracton.org/exploration/index.html
Then click on Collatz 2D.
The page uses the Discus forum software. You can comment or upload your own images. In order to comment you must have a Discus account and have cookies enabled. If you only wish to view the page you don't need a Discus account or cookies.
If you want your parameter file included in the downloadable files, zip it and then email it to: fractonorg@gmail.com
There should be additional images and information posted in the next few days.
-- Mike Frazier www.fracton.org _______________________________________________ Fractint mailing list -- fractint@mailman.xmission.com To unsubscribe send an email to fractint-leave@mailman.xmission.com
participants (3)
-
alex dukay -
Jonathan Osuch -
Mike Frazier