Python Sympy Ellipse.Director_circle()方法
在Sympy中,函数Director_circle()返回一个由椭圆的两条垂直切线相互交叉的所有点组成的圆。
语法: Ellipse.director_circle()
返回: Circle
一个导演圆作为一个几何对象返回。
示例 #1:
# import sympy and Circle, Ellipse, Point
from sympy import Circle, Ellipse, Point
p = Point(3, 8)
# using director_circle() method
directorCircle = Ellipse(p, 7, 9).director_circle()
print(directorCircle)
输出:
Circle(Point2D(3, 8), sqrt(130))
示例 2:
# import sympy and Circle, Ellipse, Point, symbols
from sympy import Circle, Ellipse, Point, symbols
p = Point(3, 8)
a, b = symbols('a b')
# using director_circle() method
directorCircle = Ellipse(p, a, b).director_circle()
print(directorCircle)
输出:
Circle(Point2D(3, 8), sqrt(a**2 + b**2))