diff --git a/HelloWorld.lhs b/HelloWorld.lhs index 3cb2e22..5c38e0c 100644 --- a/HelloWorld.lhs +++ b/HelloWorld.lhs @@ -20,17 +20,21 @@ > vectorShape :: Diagram B > vectorShape = fromOffsets . map r2 $ [(0,0), (1,1), (-2,1), (-1,-4)] > -> step :: Diagram B -> step = fromOffsets +> stepsOrigins :: [Point V2 Double] +> stepsOrigins = map p2 $ [(x, y) | x <- [0], y <- [0, (-1), (-2)]] +> +> step :: Int -> Diagram B +> step x = fromOffsets > [V2 0 0, -> V2 0 0.25, -> V2 0.5 0, -> V2 0 (-0.25), -> V2 (-0.5) 0] -> # lw veryThin +> V2 0 0.5, +> V2 0.75 0, +> V2 0 (-0.5), +> V2 (-0.75) 0] > # showOrigin +> # lw veryThin +> # named x > -> drakonPoints :: [Point V2 Double] -> drakonPoints = map p2 $ [(x, y) | x <- [0..5], y <- [0..5]] -> -> main = mainWith $ atPoints drakonPoints (repeat step) \ No newline at end of file +> main = mainWith $ +> atPoints stepsOrigins [step x | x <- [0..]] +> # connectOutside (0 :: Int) (1 :: Int) +> # connectOutside (1 :: Int) (2 :: Int) \ No newline at end of file diff --git a/README.md b/README.md index 34166dc..94991f6 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,3 @@ * [literate programming](https://wiki.haskell.org/Literate_programming) * [drakon](https://drakonhub.com/read/docs) * [diagrams](https://archives.haskell.org/projects.haskell.org/diagrams/doc/quickstart.html#introduction) -* diagrams operators: - * `(#)` - `x # f = f x` - * `(|||)` - combine two diagrams horizontally - * `hcat` - combine a list of diagrams horizontally - * `===` - combine two diagrams vertically - * `vcat` - combine a list of diagrams vertically - * `atop` - combine diagrams atop each other \ No newline at end of file diff --git a/hello-world.svg b/hello-world.svg index b07dc7b..25c9441 100644 --- a/hello-world.svg +++ b/hello-world.svg @@ -1,3 +1,3 @@ \ No newline at end of file + "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> \ No newline at end of file