Python Sympy Plane.is_coplanar()方法
在Simpy中,函数Plane.is_coplanar()被用来检查给定的平面是否共面。
语法: Plane.is_coplanar(p)
参数:
p: a Plane
返回:
真:如果平面是共面的,否则假。
示例 #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