Today, … well, yesterday I created something that creates a graph of a Gauss Curve (or binomial distribution? I have no idea).
Basically it’s a bar Diagram of the following:
I have 50 bars in the bar diagram. I simulate 50 coin flips and if for example 27 of those are heads, I count +1 for bar number 27. That I repeat 1 million times (that takes about 2 secs, inefficient code, sorry).
It’s obvious, that most of the 50-coin-toss-rounds have 25 heads and it’s much less common for anything else. That’s why the maximum is at 25 
I also wrote a Binary Tree renderer / Layouter:
(sorry for JPG quality…)
Both little test projects are written in haskell. The first one because I was curious, the second one because I wanted to test out a library that mainly I with the help of my brother wrote (https://github.com/DeclarativeGraphics). The code for rendering the Tree is the following:
data Tree a = Node a (Tree a) (Tree a) | Leaf a
exampleTree :: Tree String
exampleTree =
Node "Test"
(Node "oh"
(Leaf "my")
(Node "god"
(Leaf "tis")
(Leaf "awesum")))
(Node "right"
(Leaf "right1")
(Leaf "right2"))
data TreeStructure = SuperNode | SubLeft | SubRight deriving (Eq, Ord)
main :: IO ()
main = showFormWindow (0.5, 0.5) $ centeredHV $ renderTree exampleTree
renderTree :: Tree String -> Form
renderTree (Leaf str) = drawTreeNode str
renderTree (Node str left right) = removeTracking trackedTree `atop` conLines
where
subtrees = centeredHV $ append Vec2.right [addOriginTracking SubLeft $ renderTree left, addOriginTracking SubRight $ renderTree right]
trackedTree = append Vec2.down [addOriginTracking SuperNode $ drawTreeNode str, subtrees]
superPos = fromJust $ getTrackedPos SuperNode trackedTree
rightPos = fromJust $ getTrackedPos SubRight trackedTree
leftPos = fromJust $ getTrackedPos SubLeft trackedTree
blackLine start end = outlined (solid black) $ noBorder $ openPath $ pathPoint start `lineConnect` pathPoint end
conLines = blackLine superPos leftPos `atop` blackLine superPos rightPos
drawTreeNode :: String -> Form
drawTreeNode str = (collapseBorder $ centeredHV $ text tstyle str) `atop` (padded 10 $ filled grey $ circle 25)
where tstyle = defaultTextStyle { fontFamily = "monospace", fontSize = 8 }