Created
June 22, 2018 09:04
-
-
Save Agnishom/073adc119f7df50558eb96df95c91dfc to your computer and use it in GitHub Desktop.
Code for creating an circle with spokes
This file contains hidden or 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
| {-# LANGUAGE NoMonomorphismRestriction #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| import Diagrams.Prelude | |
| import Diagrams.Backend.SVG.CmdLine | |
| rules :: Diagram B | |
| rules = foldr1 (<>) hands | |
| where | |
| hands = [ (vrule 0.5 # translateY 0.75 # rotateBy (n/10)) | n <- [1..10]] | |
| myCircle :: Diagram B | |
| myCircle = circle 1 <> (circle 0.5 # fc grey) <> rules | |
| main = mainWith myCircle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment