Ask Your Question
0

Alpha Values of Points on a Graph

asked 13 years ago

anonymous user

Anonymous

updated 10 years ago

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.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 11 years ago

vdelecroix gravatar image

updated 11 years ago

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

Preview: (hide)
link

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: 13 years ago

Seen: 386 times

Last updated: Apr 22 '13