code: def _derive_stereographic():
      
      from sympy import symbols, atan2, acos, rot_axis1, rot_axis3, Matrix
      x_c, y_c, z_c, x, y, z = symbols('x_c y_c z_c x y z')
  
      # The angles we'll need to rotate through.
      around_z = atan2(x_c, y_c)
      around_x = acos(-z_c)
  
      # Apply rotations to produce an "o" = output vector.
      v = Matrix([x, y, z])
      xo, yo, zo = rot_axis1(around_x) * rot_axis3(-around_z) * v
  
      # Which we then use the stereographic projection to produce the
      # final "p" = plotting coordinates.
      xp = xo / (1 - zo)
      yp = yo / (1 - zo)
  
      return xp, yp
docs: Compute the formulae to cut-and-paste into the routine below.