def eval(self, t=0): """ Finds the point on the line segment defined by the input parameter. :math:`t=0` returns the origin (1st) point, defined by the input argument ``point1`` and :math:`t=1` returns the end (2nd) point, defined by the input argument ``point2``. :param t: parameter :type t: float :return: point at the parameter value :rtype: tuple """ return utilities.point_translate(self.p, utilities.vector_multiply(self.d, t))
def test_point_translate3(): with pytest.raises(TypeError): utilities.point_translate(5, 9.7)
def test_point_translate2(): pt = (1, 0, 0) vec = (5, 5, 5) result = (6, 5, 5) to_check = utilities.point_translate(pt, vec) assert to_check == result
def test_point_translate1(): with pytest.raises(ValueError): pt1 = () pt2 = (1, 2, 3) utilities.point_translate(pt1, pt2)