You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The algorithm is hidden in minified JavaScript there, but here it is in MathMap syntax:
Ax = 0;
Ay = 0;
Ax2 = 0;
Ay2 = 0;
while ((Ax2+Ay2) < 4) && (a_count < a_max) do
Ay = 2*Ax*Ay + if a_count % 2 then x else y end;
Ax = Ax2-Ay2 + x;
Ax2 = Ax*Ax;
Ay2 = Ay*Ay;
a_count = a_count + 1;
end;
In the two-real-number process of computing z²+c, y and x are swapped on alternate iterations via if a_count % 2 then x else y end;
This is a cool enough fractal that I will probably just try to add it natively, but I'm trying to figure out if I have misunderstood something about SFFE syntax.
To Reproduce
This renders a plain old Mandelbrot set as expected: (powi(re(z),2)-powi(im(z),2)+re(c))+(2*re(z)*im(z)+im(c))i
This is close to, but not quite the Meltybrot rendered by the website or MathMap: (powi(re(z),2)-powi(im(z),2)+re(c))+(2*re(z)*im(z)+(re(c)*((cos(n*3.14159265358979)+1)/2))+(im(c)*((cos((n+1)*3.141592653589793)+1)/2)))i
To alternately swap the final term im(c) I'm using cos() as a proxy for mod() because SFFE doesn't have mod() or if(). Logic: (cos(even*pi)+1)/2 == 1 and (cos(odd*pi)+1)/2 == 0
Expected behavior
I expected the picture you'll see at the website, but got something slightly weirder.
Screenshots
Web:
XaoS:
Desktop (please complete the following information):
OS: Linux
Latest XaoS from git
The text was updated successfully, but these errors were encountered:
Describe the bug
I am trying to write Meltybrot in SFFE for use with XaoS. It looks like this:
https://www.cesoid.com/fractal#al=meltybrot
The algorithm is hidden in minified JavaScript there, but here it is in MathMap syntax:
In the two-real-number process of computing z²+c, y and x are swapped on alternate iterations via
if a_count % 2 then x else y end;
This is a cool enough fractal that I will probably just try to add it natively, but I'm trying to figure out if I have misunderstood something about SFFE syntax.
To Reproduce
This renders a plain old Mandelbrot set as expected:
(powi(re(z),2)-powi(im(z),2)+re(c))+(2*re(z)*im(z)+im(c))i
This is close to, but not quite the Meltybrot rendered by the website or MathMap:
(powi(re(z),2)-powi(im(z),2)+re(c))+(2*re(z)*im(z)+(re(c)*((cos(n*3.14159265358979)+1)/2))+(im(c)*((cos((n+1)*3.141592653589793)+1)/2)))i
To alternately swap the final term
im(c)
I'm using cos() as a proxy for mod() because SFFE doesn't have mod() or if(). Logic:(cos(even*pi)+1)/2 == 1
and(cos(odd*pi)+1)/2 == 0
Expected behavior
I expected the picture you'll see at the website, but got something slightly weirder.
Screenshots
Web:
XaoS:
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: