11.hs 747 B

1234567891011121314151617181920
  1. {-# LANGUAGE OverloadedStrings #-}
  2. import Data.List
  3. import Text.LaTeX
  4. import Text.LaTeX.Base.Class
  5. import Text.LaTeX.Base.Syntax
  6. import Text.LaTeX.Packages.Graphicx
  7. import Text.LaTeX.Packages.Geometry
  8. import Util
  9. main :: IO ()
  10. main = printdoc doc
  11. doc :: Monad m => LaTeXT_ m
  12. doc = do
  13. mapM_ thing [((2.0 ** r) / 2.0, t) | r <- [-1.5, -1.3 .. 0.9], t <- [0, pi / 64 .. pi * 127 / 64]]
  14. thing :: Monad m => (Double, Double) -> LaTeXT_ m
  15. thing (r, t) = textblock' (vw $ 0.5 + r * (cos t)) (vw $ sqrt 2 / 2 + r * (sin t)) $ rotatebox' (360 * ((sin (4 * t + 7 * r)) / 8 + (sin (0.4 * pi * r * t)) ^ 2)) $ fontsize (vh . (\x -> (fromInteger $ ceiling $ x * 200) / 200.0) $ 0.01 + ((sin $ (r * t) * pi) ^ 2) / 32) (vh 0) $ texttt "MEOW MEOW MEOW"