当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


Python Sympy Plane.are_concurrent()用法及代码示例


在Simpy中,该函数Plane.are_concurrent()用于检查给定平面序列是否并发。如果两个或多个平面的交点是一条公共线,则它们是并发的。
用法: Plane.are_concurrent()

参数:
 planes: sequence of planes

返回:
 True: if they are concurrent, else False

范例1:

# import sympy, Point3D and Plane 
from sympy import Point3D, Plane 
  
# using Plane()  
p1 = Plane(Point3D(5, 0, 0), normal_vector =(1, -1, 1)) 
p2 = Plane(Point3D(0, -2, 0), normal_vector =(3, 1, 1)) 
  
# using are_concurrent() 
areConcurrent = Plane.are_concurrent(p1, p2) 
  
print(areConcurrent)

输出:



True

范例2:

# import sympy, Point3D and Plane 
from sympy import Point3D, Plane 
  
# using Plane()  
p1 = Plane(Point3D(5, 0, 0), normal_vector =(1, -1, 1)) 
p2 = Plane(Point3D(0, -2, 0), normal_vector =(3, 1, 1)) 
p3 = Plane(Point3D(0, -1, 0), normal_vector =(5, -1, 9)) 
  
# using are_concurrent() 
areConcurrent = Plane.are_concurrent(p1, p2, p3) 
  
print(areConcurrent)

输出:

False



相关用法


注:本文由纯净天空筛选整理自ravikishor大神的英文原创作品 Python | Sympy Plane.are_concurrent() method。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。