Computes the intersection points of a line with a simplex
        Args:
            point1, point2 ([float]): Points that determine the line
        Returns:
            points where the line intersects the simplex (0, 1, or 2)

def line_intersection(self, point1, point2, tolerance=1e-8):
        """
        Computes the intersection points of a line with a simplex
        Args:
            point1, point2 ([float]): Points that determine the line
        Returns:
            points where the line intersects the simplex (0, 1, or 2)
        """
        b1 = self.bary_coords(point1)
        b2 = self.bary_coords(point2)
        l = b1 - b2
        # don't use barycentric dimension where line is parallel to face
        valid = np.abs(l) > 1e-10
        # array of all the barycentric coordinates on the line where
        # one of the values is 0
        possible = b1 - (b1[valid] / l[valid])[:, None] * l
        barys = []
        for p in possible:
            # it's only an intersection if its in the simplex
            if (p >= -tolerance).all():
                found = False
                # don't return duplicate points
                for b in barys:
                    if np.all(np.abs(b - p) < tolerance):
                        found = True
                        break
                if not found:
                    barys.append(p)
        assert len(barys) < 3
        return [self.point_from_bary_coords(b) for b in barys]