| 1 | initial version |
This seems to work for me in Sage 5.6:
sage: from sympy.geometry import Circle, Point
sage: c1 = Circle(Point(0,0),2)
sage: a = Point(3,0)
sage: at = c1.tangent_lines(a)
sage: at
[Line(Point(3, 0), Point(4/3, -2*5**(1/2)/3)), Line(Point(3, 0), Point(4/3, 2*5**(1/2)/3))]
as well as on sagenb's 5.4.
BTW, star imports -- from somewhere import * -- are generally disfavoured in Python, and that's even more true in Sage, because it's very easy to accidentally rebind a name -- sin, say -- which originally referred to Sage's function with one which refers to the sin function of sympy, or mpmath, or numpy, or something, which will raise puzzling errors and be the source of mysterious bugs.
[My favourite example:
sage: all(i < 10 for i in [0..100])
False
sage: from numpy import *
sage: all(i < 10 for i in [0..100])
True
This once caused a bug in my code it took forever to track down.]
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.