code: def Torus(pos=(0, 0, 0), r=1, thickness=0.1, axis=(0, 0, 1), c="khaki", alpha=1, res=30):
      
      rs = vtk.vtkParametricTorus()
      rs.SetRingRadius(r)
      rs.SetCrossSectionRadius(thickness)
      pfs = vtk.vtkParametricFunctionSource()
      pfs.SetParametricFunction(rs)
      pfs.SetUResolution(res * 3)
      pfs.SetVResolution(res)
      pfs.Update()
  
      nax = np.linalg.norm(axis)
      if nax:
          axis = np.array(axis) / nax
      theta = np.arccos(axis[2])
      phi = np.arctan2(axis[1], axis[0])
      t = vtk.vtkTransform()
      t.PostMultiply()
      t.RotateY(theta * 57.3)
      t.RotateZ(phi * 57.3)
      tf = vtk.vtkTransformPolyDataFilter()
      tf.SetInputData(pfs.GetOutput())
      tf.SetTransform(t)
      tf.Update()
      pd = tf.GetOutput()
  
      actor = Actor(pd, c, alpha)
      actor.GetProperty().SetInterpolationToPhong()
      actor.SetPosition(pos)
      settings.collectable_actors.append(actor)
      return actor
docs: Build a torus of specified outer radius `r` internal radius `thickness`, centered at `pos`.
  
      .. hint:: |gas| |gas.py|_