fadno-braids-0.0.2: Braid representations in Haskell

Safe HaskellNone
LanguageHaskell2010

Fadno.Braids.Graphics

Description

Diagrams for braids.

Synopsis

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.