Example #1
0
 def __init__(self, point1, point2):
     "Line Instantiated"
     (x1, y1) = point1
     (x2, y2) = point2
     self.vector1 = Vector(0, 0)
     self.point = [None, None]
     self.point[0] = Point(x1, y1)
     self.point[1] = Point(x2, y2)
     self.vector = geometry.subPoints(self.point[1], self.point[0], resultant_vector=self.vector1)
Example #2
0
 def setLine(self, point1, point2):
     (x1, y1) = point1
     (x2, y2) = point2
     self.point[0].setXAndY(x1, y1)
     self.point[1].setXAndY(x2, y2)
     self.vector.setXAndY(*geometry.subPoints(self.point[1], self.point[0], resultant_vector=self.vector1).getXAndY())
Example #3
0
 def setPoint(self, point, pointindex = -1):
     (x, y) = point
     self.point[pointindex].setXAndY(x, y)
     self.vector.setXAndY(*geometry.subPoints(self.point[1], self.point[0], resultant_vector=self.vector1).getXAndY())