jpcad/Line.py
2011-03-29 14:19:59 -04:00

19 lines
385 B
Python

from Shape import Shape
class Line(Shape):
def __init__(self, x0, y0, x1, y1):
self.vars = [x0, y0, x1, y1]
def nVars(self):
return len(self.vars)
def nPts(self):
return 2
def toEqu(self, ptNum):
if ptNum == 0:
return ([1, 0, 0, 0], [0, 1, 0, 0])
elif ptNum == 1:
return ([0, 0, 1, 0], [0, 0, 0, 1])