You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
377 B

7 years ago
  1. from sympy import *
  2. class semicircle:
  3. def __init__(self,x,y,r,upper=False):
  4. if upper:
  5. self.coef = 1
  6. else:
  7. self.coef = -1
  8. self.x = x
  9. self.y = y
  10. self.r = r
  11. self.expr = simplify(self.y + self.coef * sqrt(r**2 -
  12. class circle:
  13. def __init__(self,x,y,r):
  14. self.x = x
  15. self.y = y
  16. self.r = r