This code is by the Stanford Visualisation group