Created
November 4, 2014 12:10
-
-
Save vagmi/3dbcf85415f71b90a811 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Window | |
logoBlue:Color | |
logoBlue=rgb 96 181 204 | |
logoGrey:Color | |
logoGrey=rgb 90 99 120 | |
logoYellow:Color | |
logoYellow=rgb 239 165 0 | |
logoGreen:Color | |
logoGreen=rgb 141 215 55 | |
logoGon : Color -> [(Float, Float)] -> Form | |
logoGon clr points = polygon points |> filled clr | |
|> scale 200 | |
elmTangram (w,h) = color grey <| container w h middle | |
<| collage 400 400 [ (logoGon logoBlue [(0, -0.01), (-0.99, -1), (0.99, -1)]), | |
(logoGon logoBlue [(1, 1), (0.01, 1), (1, 0.01)]), | |
(logoGon logoGrey [(-0.01, 0), (-1, -0.99), (-1, 0.99)]), | |
(logoGon logoYellow [(1, -1), (1, -0.01), (0.51, -0.5)]), | |
(logoGon logoYellow [(0, 0.01), (0.49, 0.49), (-0.49, 0.49)]), | |
(logoGon logoGreen [(0.01, 0), (0.5, 0.49), (1, 0), (0.5, -0.5)]), | |
(logoGon logoGreen [(-0.01, 1), (-0.99, 1), (-0.49, 0.5), (0.5, 0.5) ])] | |
main = lift elmTangram Window.dimensions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment