我有下面的代码,它使用Python matplotlib生成一个圆形多边形(圆形面片的多边形近似值)。在
import matplotlib.pyplot as plt
from matplotlib.patches import CirclePolygon
circle = CirclePolygon((0, 0), radius = 0.75, fc = 'y')
plt.gca().add_patch(circle)
plt.axis('scaled')
plt.show()
我需要所有的点在一起形成一个圆多边形。如何做到这一点?在
多边形基于路径。您可以通过
circle.get_path()
获得此路径。您对该路径的vertices
感兴趣。 最后,需要根据多边形的变换对它们进行变换。在蓝线是由此得到的点的图。在
相关问题 更多 >
编程相关推荐