📜  Python| Sympy Ellipse.director_circle() 方法

📅  最后修改于: 2022-05-13 01:54:54.866000             🧑  作者: Mango

Python| Sympy Ellipse.director_circle() 方法

在 Sympy 中, director_circle()函数返回一个圆,该圆由两条垂直于椭圆的切线相互交叉的所有点组成。
Syntax: Ellipse.director_circle()

Returns: Circle
 A director circle returned as a geometric object.

示例 #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))