23 lines
539 B
Python
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])
|