Polygons and triangles in hyperbolic geometry¶
AUTHORS:
- Hartmut Monien (2011-08)
- Vincent Delecroix (2014-11)
-
class
sage.plot.hyperbolic_polygon.HyperbolicPolygon(pts, options)¶ Bases:
sage.plot.bezier_path.BezierPathPrimitive class for hyberbolic polygon type.
See
hyperbolic_polygon?for information about plotting a hyperbolic polygon in the complex plane.INPUT:
pts– coordinates of the polygon (as complex numbers)options– dict of valid plot options to pass to constructor
EXAMPLES:
Note that constructions should use
hyperbolic_polygon()orhyperbolic_triangle():sage: from sage.plot.hyperbolic_polygon import HyperbolicPolygon sage: print(HyperbolicPolygon([0, 1/2, I], {})) Hyperbolic polygon (0.000000000000000, 0.500000000000000, 1.00000000000000*I)
-
sage.plot.hyperbolic_polygon.hyperbolic_polygon(pts, rgbcolor='blue', thickness=1, zorder=2, alpha=1, linestyle='solid', fill=False, **options)¶ Return a hyperbolic polygon in the hyperbolic plane with vertices
pts.Type
?hyperbolic_polygonto see all options.INPUT:
pts– a list or tuple of complex numbers
OPTIONS:
alpha– default: 1fill– default:Falsethickness– default: 1rgbcolor– default:'blue'linestyle– (default:'solid') The style of the line, which is one of'dashed','dotted','solid','dashdot', or'--',':','-','-.', respectively.
EXAMPLES:
Show a hyperbolic polygon with coordinates \(-1\), \(3i\), \(2+2i\), \(1+i\):
sage: hyperbolic_polygon([-1,3*I,2+2*I,1+I]) Graphics object consisting of 1 graphics primitive
With more options:
sage: hyperbolic_polygon([-1,3*I,2+2*I,1+I], fill=True, color='red') Graphics object consisting of 1 graphics primitive
-
sage.plot.hyperbolic_polygon.hyperbolic_triangle(a, b, c, **options)¶ Return a hyperbolic triangle in the hyperbolic plane with vertices
(a,b,c).Type
?hyperbolic_polygonto see all options.INPUT:
a, b, c– complex numbers in the upper half complex plane
OPTIONS:
alpha– default: 1fill– default:Falsethickness– default: 1rgbcolor– default:'blue'linestyle- (default:'solid') The style of the line, which is one of'dashed','dotted','solid','dashdot', or'--',':','-','-.', respectively.
EXAMPLES:
Show a hyperbolic triangle with coordinates \(0, 1/2+i\sqrt{3}/2\) and \(-1/2+i\sqrt{3}/2\):
sage: hyperbolic_triangle(0, -1/2+I*sqrt(3)/2, 1/2+I*sqrt(3)/2) Graphics object consisting of 1 graphics primitive
A hyperbolic triangle with coordinates \(0, 1\) and \(2+i\) and a dashed line:
sage: hyperbolic_triangle(0, 1, 2+i, fill=true, rgbcolor='red', linestyle='--') Graphics object consisting of 1 graphics primitive