import Data.Complex
conv p=(\n->".,:;|!([$O0*%#@?"!!(n-1))(ceiling (p*8)::Int)
gr=map(\y->[(x:+y)|x<-[-2,-1.97..0.7]])[-1.2,-1.13..1.2]
--px w=magnitude(foldl1(\z c ->z^2 +c)(replicate 10 w))
px w=(magnitude.last.take 10.takeWhile(\r->(magnitude r )<6).iterate(\z->z^2+w))w
image=map((map(\el->case(px el<2)of{true->conv(px el);_->' '})))gr
main=mapM_ putStrLn image
better...
Nessun commento:
Posta un commento