Python| Sympy Plane.equation() 方法
在 Simpy 中,函数
Plane.equation()
用于生成给定平面的方程。 Syntax : Plane.equation(x, y, z)
Parameters :
x : optional
y : optional
z : optional
Returns : 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