Exemplo n.º 1
0
 def __init__(self, p1, sides,length):
     GeometricObject.__init__(self)
     self.start = p1
     self.sideLength = length
     self.numsides = sides
Exemplo n.º 2
0
 def __init__(self, p1,r):
     GeometricObject.__init__(self)
     self.center = p1
     self.radius = r
Exemplo n.º 3
0
 def __init__(self, p1,p2):
     GeometricObject.__init__(self)
     self.p1 = p1
     self.p2 = p2
Exemplo n.º 4
0
 def __init__(self, x,y):
     GeometricObject.__init__(self)
     self.x = x
     self.y = y
Exemplo n.º 5
0
 def __init__(self, r=1.0, color="white", filled=True):
     '''creates a circle with radius r'''
     GeometricObject.__init__(self, color, filled)
     self._r = r
Exemplo n.º 6
0
 def __str__(self):
     return "Triangle: side 1 = " + str(self. _s1) + " side 2 = " + str(self._s2) +\
            " side 3 = " + str(self._s3) + " " + GeometricObject.__str__(self)
Exemplo n.º 7
0
 def __init__(self, s1=1.0, s2=1.0, s3=1.0, color="white", filled=True):
     GeometricObject.__init__(self, color, filled)
     self._s1 = s1
     self._s2 = s2
     self._s3 = s3
Exemplo n.º 8
0
 def __str__(self):
     '''Circle with center (x, y) and radius radius'''
     return "Circle: radius = " + str(
         self._r) + " " + GeometricObject.__str__(self)