Ask Your Question
0

Alpha Values of Points on a Graph

asked 2011-07-14 18:04:29 +0100

anonymous user

Anonymous

updated 2015-01-14 10:13:37 +0100

FrédéricC gravatar image

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?

Thanks in advance, and I'll be glad to specify any additional details that are necessary.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2013-04-22 15:21:40 +0100

vdelecroix gravatar image

updated 2013-04-22 15:24:01 +0100

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).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-07-14 18:04:29 +0100

Seen: 353 times

Last updated: Apr 22 '13