def radius(R, H, h):
    """
    find the horizontal distance of the intersection at y = h of the line from (0, H) to (R, 0)
    """
    if 0 <= h <= H:
        r = R - (R * h) / H
        return r

    else:
        print("radius function: height is not in range")