Is there any way to compute figures as a sets of points in Python?
I mean, lets say that I define a circumference and a triangle and then, I define a new figure that is the result of the intersection of the triangle and the circumference. With that resulting figure/surface, I also want to add, or intersect more figures and get some properties from it, like the centroid of the resulting figure. Is there any library which I can do it? I think it's not possible with matplotlib...
For example:
c = circumference(0,0,1) #circumference at 0,0 and radius 1
t = triangle([0,0], [-2,2], [1,1])
new_figure = c & t
print (new_figure.centroid())
>>-0.5, 0.77
Thank you.