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


Python Sympy Plane.equation()用法及代碼示例

在Simpy中,該函數Plane.equation()用於製作給定平麵的方程。
用法:  Plane.equation(x, y, z)

參數:
x: optional
y: optional
z: optional

返回: Equation of Plane

範例1:

# import sympy, Point3D and Plane 
from sympy import Point3D, Plane 
  
# using Plane() 
  
p1 = Plane(Point3D(1, 2, 3), Point3D(4, 5, 6), Point3D(0, 2, 0)) 
p2 = p1.equation() 
  
print(p2)

輸出:



-9*x + 6*y + 3*z - 12

範例2:

# import sympy, Point3D and Plane 
from sympy import Point3D, Plane 
  
# using Plane() 
  
p3 = Plane(Point3D(1, 2, 3), normal_vector =(2, 2, 2)) 
p4 = p3.equation() 
  
print(p4)

輸出:

2*x + 2*y + 2*z - 12



相關用法


注:本文由純淨天空篩選整理自ravikishor大神的英文原創作品 Python | Sympy Plane.equation() method。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。