Skip to content

Instantly share code, notes, and snippets.

@pxqr
Created June 9, 2014 12:05
Show Gist options
  • Save pxqr/52d6b40eac5a2abc784e to your computer and use it in GitHub Desktop.
Save pxqr/52d6b40eac5a2abc784e to your computer and use it in GitHub Desktop.
outputs svg lambda in grayscale
{-# LANGUAGE NoMonomorphismRestriction #-}
module Main (main) where
import Diagrams.Prelude
import Diagrams.Backend.SVG.CmdLine
lambda :: Diagram B R2
lambda = fromVertices
[ 0 ^& 0, 0.4 ^& 0.6
, 0.2 ^& 1.0, 0.4 ^& 1.0
, 1.0 ^& 0, 0.8 ^& 0
, 0.5 ^& 0.5
, 0.2 ^& 0, 0 ^& 0
]
main :: IO ()
main = mainWith $ fillColor gray lambda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment