Added reference code from AnkhMorpork' tag3d repo for research