jpcad/Circle.py
2011-03-29 13:20:38 -04:00

25 lines
564 B
Python

from Shape import Shape
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])