my code of the mid-domain effect code (almost got it to work)
Merge branch 'master' of https://github.com/PermuteSeminar/PermuteSeminar-2014