hmt-diagrams-0.15: Haskell Music Theory Diagrams

Safe HaskellNone
LanguageHaskell98

Music.Theory.Diagram.Render.Circular

Description

Functions for circular representations of Zn structures.

Synopsis

Documentation

type P = Pt R Source

circle_s :: Ca -> P -> R -> Render () Source

marks :: R -> Int -> [R] Source

marks_p :: R -> R -> Int -> [P] Source

frame :: R -> Int -> Text_F -> Render () Source

Frame, circle at (0,0) with radius r and n marks.

circle_polygon :: R -> Int -> Ca -> [Int] -> Render () Source

circle_marks :: R -> Int -> Ca -> [Int] -> Render () Source

to_file :: File_Type -> FilePath -> Render () -> IO () Source

Variant of render_to_file.

let s = [[0..11],[0,2..10],[0,3..9],[0,4,8]
        ,[0,5,10,3,8,1,6,11,4,9,2,7]]
in to_file F_SVG "/tmp/circular" (circle_diagram_set 12 (Just show) s)
let s = [[0,5,6,7],[1,2,3,8],[4,9,10,11]]
in to_file F_SVG "/tmp/circular" (circle_diagram_set 12 (Just show) s)
let {s = [0,1,5,6,12,25,29,36,42,48,49,53]
    ;t = [0,8,16,18,26,34]
    ;z = map (\i -> map ((`mod` 72) . (+ i)) s) t}
in to_file F_SVG "/tmp/circular" (circle_diagram_set 72 (Just show) z)