CoCalc Public Filestmp / 2016-04-06-102840.elmOpen in with one click!
Author: William A. Stein
1
import Color exposing (..)
2
import Graphics.Collage exposing (..)
3
import Graphics.Element exposing (..)
4
import Time exposing (..)
5
6
main =
7
Signal.map clock (every second)
8
9
clock t =
10
collage 400 400
11
[ filled lightGrey (ngon 12 110)
12
, outlined (solid grey) (ngon 12 110)
13
, hand orange 100 t
14
, hand charcoal 100 (t/60)
15
, hand charcoal 60 (t/720)
16
]
17
18
hand clr len time =
19
let angle = degrees (90 - 6 * inSeconds time)
20
in
21
segment (0,0) (fromPolar (len,angle))
22
|> traced (solid clr)
23