def internal_division(p1, p2, r1, r2):
    """Find the point internally dividing two points.

    ip = r2/(r1+r2)*p1 + r1/(r1+r2)*b

    (p1)---<r1>---(ip)---<r2>---(p2)


    Args:
        p1 : QPointF
            First point.
        p2 : QPointF
            Second point.
        r1 : float
            Ratio from the p1.
        r2 : float
            Ratio from the p2.

    Returns:
        ip : QPointF
            Internal point of the two points.

    Examples:
        >>> a = QPointF(0, 0)
        >>> b = QPointF(2, 0)
        >>> internal_division(a, b, 1, 1)
        PyQt5.QtCore.QPointF(1.0, 0.0)

        >>> c = QPointF(1, 1)
        >>> internal_division(a, c, 0.3, 0.7)
        PyQt5.QtCore.QPointF(0.3, 0.3)

        >>> internal_division(a, b, 2, 8)
        PyQt5.QtCore.QPointF(0.4, 0.0)
    """
    sum_r = r1 + r2


    return (r2/sum_r*p1) + (r1/sum_r*p2)