當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


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。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。