Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# -*- coding: utf-8 -*- Interface to Hyperbolic Models
This module provides a convenient interface for interacting with models of hyperbolic space as well as their points, geodesics, and isometries.
The primary point of this module is to allow the code that implements hyperbolic space to be sufficiently decoupled while still providing a convenient user experience.
The interfaces are by default given abbreviated names. For example, UHP (upper half plane model), PD (Poincaré disk model), KM (Klein disk model), and HM (hyperboloid model).
.. NOTE::
All of the current models of 2 dimensional hyperbolic space use the upper half plane model for their computations. This can lead to some problems, such as long coordinate strings for symbolic points. For example, the vector ``(1, 0, sqrt(2))`` defines a point in the hyperboloid model. Performing mapping this point to the upper half plane and performing computations there may return with vector whose components are unsimplified strings have several ``sqrt(2)``'s. Presently, this drawback is outweighted by the rapidity with which new models can be implemented.
AUTHORS:
- Greg Laun (2013): Initial version. - Rania Amer, Jean-Philippe Burelle, Bill Goldman, Zach Groton, Jeremy Lent, Leila Vaden, Derrick Wigglesworth (2011): many of the methods spread across the files.
EXAMPLES::
sage: HyperbolicPlane().UHP().get_point(2 + I) Point in UHP I + 2
sage: HyperbolicPlane().PD().get_point(1/2 + I/2) Point in PD 1/2*I + 1/2 """ #*********************************************************************** # # Copyright (C) 2013 Greg Laun <glaun@math.umd.edu> # # # # Distributed under the terms of the GNU General Public License (GPL) # as published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***********************************************************************
HyperbolicModelUHP, HyperbolicModelPD, HyperbolicModelHM, HyperbolicModelKM)
""" Return ``n`` dimensional hyperbolic space.
EXAMPLES::
sage: from sage.geometry.hyperbolic_space.hyperbolic_interface import HyperbolicSpace sage: HyperbolicSpace(2) Hyperbolic plane """ raise NotImplementedError("currently only implemented in dimension 2")
""" The hyperbolic plane `\mathbb{H}^2`.
Here are the models currently implemented:
- ``UHP`` -- upper half plane - ``PD`` -- Poincaré disk - ``KM`` -- Klein disk - ``HM`` -- hyperboloid model """ """ Initialize ``self``.
EXAMPLES::
sage: H = HyperbolicPlane() sage: TestSuite(H).run() """
""" Return a string representation of ``self``.
EXAMPLES::
sage: HyperbolicPlane() Hyperbolic plane """
""" Return a realization of ``self``.
EXAMPLES::
sage: H = HyperbolicPlane() sage: H.a_realization() Hyperbolic plane in the Upper Half Plane Model """
r""" The category of hyperbolic models of hyperbolic space. """ r""" Initialize the hyperbolic models of hyperbolic space.
INPUT:
- ``base`` -- a hyperbolic space
TESTS::
sage: from sage.geometry.hyperbolic_space.hyperbolic_interface import HyperbolicModels sage: H = HyperbolicPlane() sage: models = HyperbolicModels(H) sage: H.UHP() in models True """
r""" Return the representation of ``self``.
EXAMPLES::
sage: from sage.geometry.hyperbolic_space.hyperbolic_interface import HyperbolicModels sage: H = HyperbolicPlane() sage: HyperbolicModels(H) Category of hyperbolic models of Hyperbolic plane """
r""" The super categories of ``self``.
EXAMPLES::
sage: from sage.geometry.hyperbolic_space.hyperbolic_interface import HyperbolicModels sage: H = HyperbolicPlane() sage: models = HyperbolicModels(H) sage: models.super_categories() [Category of metric spaces, Category of realizations of Hyperbolic plane] """
""" Return an element of ``self``.
EXAMPLES::
sage: H = HyperbolicPlane() sage: H.UHP().an_element() Point in UHP I sage: H.PD().an_element() Point in PD 0 sage: H.KM().an_element() Point in KM (0, 0) sage: H.HM().an_element() Point in HM (0, 0, 1) """ |