def _interpolate(elem, invstep, trans, scale):
    """Interpolate SVG path element so on average we have ~invstep points per unit distance"""
    dist = abs(elem.start - elem.end) * scale
    steps = max(1, int(dist * invstep))
    return [scale * (elem.point(i/steps)+trans) for i in range(steps)]