import math


def get_coord_sphere(long, lat, r) -> tuple:
    """ Let r = radius of a sphere, omega = longitude angle, and phi = latitude angle.
       Omega = 0 at London's longitude. phi = 0 at the equator.
       r varies from r = 0 to R Earth's radius to R + h where h is the height above the surface of Earth. 

       Then x = r cos(phi)cos(omega),
            z = r cos(phi)sin(omega),
        and y = r sin(phi)

        >>> get_coord_sphere(0,90,20)
        (0.0, 20.0, 1.2246467991473533e-15)
        >>> get_coord_sphere(45,45,20)
        (10.0, 14.14213562373095, 10.000000000000002)
        >>> get_coord_sphere(-80,20,20)
        (-18.50833156796647, 6.840402866513374, 3.2635182233306983)
        >>>

    """

    omega = math.radians(long)
    phi = math.radians(lat)
    z = r * math.cos(phi) * math.cos(omega)
    x = r * math.cos(phi) * math.sin(omega)
    y = r * math.sin(phi)
    
    return x, y, z