> import Graphics.HGL > draw :: IO () > draw = runGraphics $ > withWindow_ "Marnes Augusto Hoff" (1000,7000) $ \ w -> do > pontilha w $ (map faz_pontos bbbbb) > getKey w > where > pontilha w [a] = drawInWindow w a > pontilha w (a:b) = do > drawInWindow w a > pontilha w b > faz_pontos (a,b) = ponto (fromInteger a,fromInteger b) > where > ponto (x,y) = polygon [(x,y),(x+1,y),(x+1,y+1),(x,y+1)] > bbbbb = map (\(x,y)->(floor(1000*mod1((trocameio x))),floor(700*mod1((trocameio y))))) aaaaa > aaaaa = concat [ take 2500 ( iterate f (0.1,0.05*i) ) | i<-[1,3..20] ] > where > f (x,y) = (x2,y2) > where > x1 = mod1 x > y1 = mod1 y > y2 = y1 - sin(2*pi*x1)/(2*pi) > x2 = x1 + y2 > trocameio a | a>=0.5 = a-0.5 > | a<0.5 = a+0.5 > | otherwise = a > mod1 a = a - fromInteger (floor a)