convert agent.Torus3D to Scala
remove unused code