def tri_bary(bary, base_pts):
    """Transforms barycentric coordinates to a (Euclidean) triangle
    defined by base_pts.

    Args:
        bary: Array, shape [..., 3]. Barycentric coordinates.
        base_pts: Array, shape [3, ...]. Coordinates of the triangle.
            Should be in counterclockwise order to maintain orientation.

    Returns:
        Coordinates in whatever space base_pts was define in.

    >>> tri_bary(_TEST_BARY, _TEST_SKEW_TRI)
    array([[ 0.8 ,  0.6 ,  0.  ],
           [ 0.64,  0.68,  0.  ],
           [ 0.48,  0.56,  0.2 ],
           [ 0.32,  0.44,  0.4 ],
           [ 0.16,  0.62,  0.3 ],
           [ 0.  ,  0.5 ,  0.5 ]])

    """
    return bary.dot(base_pts)