Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Diagrams for braids.
Synopsis
- data DrawConf = DrawConf {}
- renderBraid :: Braid b a => DrawConf -> [BraidDrawF a] -> FilePath -> b a -> IO ()
- type BraidDrawF a = [Strand a] -> [Diagram B] -> [Diagram B]
- renderStrand :: Integral a => DrawConf -> [StrandDrawF a] -> FilePath -> Colour Double -> Strand a -> IO ()
- type StrandDrawF a = Strand a -> Diagram B -> Diagram B
- colorStrands :: BraidDrawF a
- colorLoops :: forall a. (Eq a, Show a) => BraidDrawF a
- gridStrand :: Integral a => StrandDrawF a
- renderBraids :: Braid b a => DrawConf -> [BraidDrawF a] -> FilePath -> [[b a]] -> IO ()
- randomBraid :: Int -> IO (MultiGen Int)
Documentation
Configure braid/strand drawing.
renderBraid :: Braid b a => DrawConf -> [BraidDrawF a] -> FilePath -> b a -> IO () Source #
Draw a braid with specified stepWidth and draw decorators.
type BraidDrawF a = [Strand a] -> [Diagram B] -> [Diagram B] Source #
Modify braid drawing, with strand data and diagrams.
renderStrand :: Integral a => DrawConf -> [StrandDrawF a] -> FilePath -> Colour Double -> Strand a -> IO () Source #
Draw a strand with specified stepWidth, color, and draw decorators.
type StrandDrawF a = Strand a -> Diagram B -> Diagram B Source #
Modify a single-strand drawing, with strand and diagram.
colorStrands :: BraidDrawF a Source #
Color a braid's strands separately.
colorLoops :: forall a. (Eq a, Show a) => BraidDrawF a Source #
Color a braid's loops, such that looped strands have the same color.
gridStrand :: Integral a => StrandDrawF a Source #
Draw a grid behind a single strand.
renderBraids :: Braid b a => DrawConf -> [BraidDrawF a] -> FilePath -> [[b a]] -> IO () Source #
Draw rows and columns of braids with specified stepWidth and draw decorators.