--- snowflake-original.hs 2012-07-03 14:36:15.774407445 -0400 +++ snowflake.hs 2012-07-03 14:22:16.235753369 -0400 @@ -11,7 +11,7 @@ $ (iterate (\z -> z*z+c) (0:+0) ) half_width_pixels::Int -half_width_pixels = 400 +half_width_pixels = 1800 scaling::Double->Int->Double scaling width = (* (width /(fromIntegral half_width_pixels))) @@ -20,8 +20,11 @@ range width= map (scaling width) [-half_width_pixels .. half_width_pixels] +-- the "28" was discovered by trial and error for zoom 6. iterations::Int -iterations = 200 +iterations = 310+28 -- 310; +-- perl -plwe 'next unless /^\d+$/;if($_>255){$_=255}' fileout | xloadimage stdin +-- perl -plwe 'next unless /^-?\d+$/;if($_>255){$_=255}elsif($_<0){$_=0}' fileout | xloadimage stdin main::IO () main = do{ @@ -30,7 +33,7 @@ args <- getArgs; let {side = exp(-(read (head args)))}; putStr $ unlines $ map show - $ concatMap ( (\i -> [i,i,(i+55)]) + $ concatMap ( (\i -> [i-55-28,i-55-28,i-28]) -- (\i -> [i-55,i-55,i]) . (mandelbrot_eval iterations) . (+ center) ) $ [x:+y | x<-(range side), y<-(range side)]