code: def sphrec(r, colat, lon):
      
      r = ctypes.c_double(r)
      colat = ctypes.c_double(colat)
      lon = ctypes.c_double(lon)
      rectan = stypes.emptyDoubleVector(3)
      libspice.sphrec_c(r, colat, lon, rectan)
      return stypes.cVectorToPython(rectan)
docs: Convert from spherical coordinates to rectangular coordinates.
  
      http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/sphrec_c.html
  
      :param r: Distance of a point from the origin.
      :type r: float
      :param colat: Angle of the point from the positive Z-axis.
      :type colat: float
      :param lon: Angle of the point from the XZ plane in radians.
      :type lon: float
      :return: Rectangular coordinates of the point.
      :rtype: 3-Element Array of floats