如何用sympy计算两个多边形的交集面积? [英] How can I compute the area of intersection of two polygons with sympy?

查看:109
本文介绍了如何用sympy计算两个多边形的交集面积?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何用sympy计算两个多边形的交集面积?

How can I compute the area of intersection of two polygons with sympy?

给定的是 sympy 中的两个多边形 (sympy.geometry.polygon.Polygon)

Given are two polygons in sympy (sympy.geometry.polygon.Polygon)

我是 python 和 sympy 的新手,所以我没有任何代码可以显示.我尝试从文档中学习它,但目前我很困惑.

I'm new to python and sympy, so I don't have any code to show. I tried learning it from documentation but I'm confused at the moment.

有人可以帮忙吗?

提前致谢

推荐答案

SymPy 将计算线和点的交点,但不计算重叠区域.我建议您查看其他地方.

SymPy will calculate intersections of lines and points but does not calculate regions of overlap. I would recommend looking elsewhere.

这篇关于如何用sympy计算两个多边形的交集面积?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆