Code for reproducing the examples in my Licentiate's thesis