Math
You probably want to see my
dissertation
or the accompanying
source code.