Python| Sympy Plane.parallel_plane() 方法
在 Sympy 中,函数Plane.parallel_plane() 用于返回平行于给定平面并通过给定点的平面。
Syntax: Plane.parallel_plane(pt)
Parameters:
pt: Point3D
Returns: Plane
示例 #1:
Python3
# 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)
Python3
# 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(2, 3, 5), (4, 5, 6))
示例 #2:
Python3
# 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))