📜  Python| Sympy Plane.is_coplanar() 方法

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

Python| Sympy Plane.is_coplanar() 方法

在 Simpy 中,函数Plane.is_coplanar()用于检查给定平面是否共面。
Syntax: Plane.is_coplanar(p)

Parameter:
 p: a Plane

Returns:
 True: if planes are coplanar, else False

示例 #1:

# import sympy, Point3D and Plane
from sympy import Point3D, Plane
   
o = (0, 0, 0)
  
# using Plane() 
p1 = Plane(o, (1, 1, 1))
p2 = Plane(o, (2, 2, 2))
  
# using is_coplanar()
isCoplanar = p1.is_coplanar(p2)
  
print(isCoplanar)

输出:

True

示例 #2:

# import sympy, Point3D and Plane
from sympy import Point3D, Plane
   
o = (0, 0, 0)
  
# using Plane() 
p3 = Plane(o, (1, 1, 1))
p4 = Plane(o, (3, 2, 1))
  
# using is_coplanar()
isCoplanar = p3.is_coplanar(p4)
  
print(isCoplanar)

输出:

False