Python Sympy Plane.parallel_plane()方法
在Sympy中,函数Plane.parallel_plane()是用来返回与给定平面平行并通过给定点的平面。
语法: Plane.parallel_plane(pt)
参数 :
pt: Point3D
返回: Plane
示例 #1:
# import sympy, Point3D and Plane
from sympy import Point3D, Plane
# using Plane()
p1 = Plane(Point3D(1, 2, 3), normal_vector =(4, 5, 6))
# using parallel_plane()
parallelPlane = p1.parallel_plane(Point3D(2, 3, 5))
print(parallelPlane)
输出:
Plane(Point3D(2, 3, 5), (4, 5, 6))
示例 #2:
# import sympy, Point3D and Plane
from sympy import Point3D, Plane
# using Plane()
p2 = Plane(Point3D(1, 1, 2), Point3D(2, 4, 7), Point3D(3, 5, 1))
# using parallel_plane()
parallelPlane = p2.parallel_plane(Point3D(1, 2, 3))
print(parallelPlane)
输出:
Plane(Point3D(1, 2, 3), (-23, 11, -2))