Safe Haskell | None |
---|---|
Language | Haskell2010 |
Diagrams for braids.
- renderBraid :: Braid b a => Int -> [BraidDrawF a] -> FilePath -> b a -> IO ()
- type BraidDrawF a = [Strand a] -> [Diagram B] -> [Diagram B]
- renderStrand :: Integral a => Int -> [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 => Int -> [BraidDrawF a] -> FilePath -> [[b a]] -> IO ()
Documentation
renderBraid :: Braid b a => Int -> [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
A function to affect strand presentation in a braid.
renderStrand :: Integral a => Int -> [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
A function to affect strand presentation in a single-strand image.
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 => Int -> [BraidDrawF a] -> FilePath -> [[b a]] -> IO () Source
Draw rows and columns of braids with specified stepWidth and draw decorators.