jpcad/Circle.py
2011-03-28 16:22:25 -04:00

23 lines
539 B
Python

class Circle(Shape):
def __init__(self, x, y, r):
self.vars = [x, y, r]
def nVars(self):
return len(self.vars)
def nPts(self):
return 5
def toEqu(self, ptNum):
if ptNum == 0:
return ([1, 0, 0], [0, 1, 0])
elif ptNum == 1:
return ([1, 0, 1], [0, 1, 0])
elif ptNum == 2:
return ([1, 0, 0], [0, 1, 1])
elif ptNum == 3:
return ([1, 0, -1], [0, 1, 0])
elif ptNum == 4:
return ([1, 0, 0], [0, 1, -1])