python计算平行线
【摘要】
用的库:sympy
点平移:
from sympy.geometry import ( Line, Point) if __name__ == '__main__': p1 = Point(10, 10) p2 = Point(100, 8) ccc= p1.translate(1, 1) print...
用的库:sympy
点平移:
-
from sympy.geometry import ( Line, Point)
-
-
if __name__ == '__main__':
-
-
p1 = Point(10, 10)
-
p2 = Point(100, 8)
-
-
ccc= p1.translate(1, 1)
-
print(ccc)
python移动平行线:
p1是起点的新位置,
-
-
from sympy.geometry import ( Line, Point)
-
-
-
p1 = Point(3, 3)
-
-
p3 = Point(2, 5)
-
p4 = Point(4, 1)
-
-
-
-
l2_1 = Line(p3, p4)
-
line3=l2_1.parallel_line(p1) #== Line(Point(0, 0), Point(0, -1))
-
-
print(line3)
-
参考:
向量夹角:
angle_between
垂线
perpendicular_line
点到直线距离:
distance
线段焦点:
-
-
from sympy.geometry import ( Line, Point)
-
-
-
p1 = Point(3, 1)
-
p2 = Point(1, 8)
-
-
l1 = Line(p1, p2)
-
p3 = Point(2, 2)
-
p4 = Point(4, 4)
-
-
-
-
l2_1 = Line(p3, p4)
-
-
line3=l2_1.intersection(l1)
-
-
print(line3)
-
文章来源: blog.csdn.net,作者:AI视觉网奇,版权归原作者所有,如需转载,请联系作者。
原文链接:blog.csdn.net/jacke121/article/details/120610210
【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)