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