# Alpha Values of Points on a Graph

Hello, I'm working on a project that requires the overlapping of many distinct polygons. I have the polygons set up so that they each have a small alpha value so that the overlaps can be seen visually. However, when alpha is very small, it is hard to tell when there is overlap between twelve polygons or thirteen polygons merely by looking at the graph since the transparency difference is so minimal. Because of this, I would like the program user to be able to specify a point in the plane, and be returned what alpha is equal to. Is this feasible?

edit retag close merge delete

Sort by » oldest newest most voted

Hello,

The graphical objects are quite static (you can not use them for computations). If you would like to find intersections between several polyhedra you may use the object Polyhedron for which it is possible to compute intersections:

sage: P = Polyhedron([(0,0),(1,0),(2,2),(3,1)])
sage: Q = Polyhedron([(-1,-3),(1,1),(2,4),(4,-5)])
sage: Z = P.intersection(Q)
sage: Z.vertices_list()
[[18/7, 10/7], [27/10, 17/20], [1, 0], [2, 2], [1/2, 1/2], [2/7, 0]]


As intersection of polyhedra are polyhedra you may plot them as well.

sage: Z.plot()


Note that in sage-5.9 there will be fine options to plot polyhedron (ticket #14175).

more