Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

2D Euclidean geometry in Sage?

I haven't used Sage for a awhile, as my work has pulled me in other directions. Anyway, I'm currently doing some work which requires a certain amount of computational geometry. It's mainly quite basic: angle bisectors of polygons, checking concurrency of lines, that sort of thing. Here's an example of a sub-problem: suppose I have the 4 points A = (1,0), B = (cos(s), sin(s)), C = (cos(t),sin(t)), D = (-1,0), with 0 < s < t < pi. So A, B, C, D are distinct and in a counter-clockwise direction on the upper unit circle. In this case I want to find the symbolic intersection of the angle bisectors of ABC and BCD.

I would have thought this to be trivial, but unless I'm looking for the wrong thing, I can't find any reference in the documentation to angle bisection. I can in fact do this in Python's own library Sympy, but it's painfully slow, and in any case the simplification capabilities of Sympy are less powerful than those of Sage.

Are there tools in Sage to do this? Thank you!