JuliaFP = Compile[
{{const,_Complex}, {init,_Complex}},
Module[{val=init,n=0},
While[Abs[val] < 5 && n < 25, val = val^2 + const; n++];
{Mod[Arg[val]/(2*3.14159), 1], 1 - Abs[val]/5, 1 - Abs[val]/100}
],
CompilationTarget -> "C",
RuntimeAttributes -> Listable,
RuntimeOptions -> "Speed"
];
{fine, coarse} = Table[Complex[j,i],
{dx, {0.008, 0.002}}, {i,-1.5,1.5,dx}, {j,-1.5,1.5,dx}
];
pt = {0.0,0.0};
Graphics[{
Raster[
JuliaFP[Complex @@ pt/2, If[ControlActive[], fine, coarse]],
{{-2.0,-2.0}, {2.0,2.0}},
ColorFunction-> Hue
],
Locator[Dynamic[pt]]},
ImageSize -> 800
] // Dynamic
P.S. Original post is awesome. I love the cow!Anyone have any insights?
I'll also note that Mathematica looks quite awesome indeed.
[1] http://nbviewer.ipython.org/url/beowulf.csail.mit.edu/18.337...