1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
# Copyright (c) 1997-2024
# Ewgenij Gawrilow, Michael Joswig, and the polymake team
# Technische Universität Berlin, Germany
# https://polymake.org
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version: http://www.gnu.org/licenses/gpl.txt.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#-------------------------------------------------------------------------------
#A hyperbolic surface (noncompact, finite area) is given by a triangulation [[DCEL]] (the topological data) and [[PENNER_COORDINATES]] (the metric data).
declare object HyperbolicSurface {
# The triangulation of the surface is encoded by a half edge data structure.
# For each edge i of the triangulation there are two half edges 2i and 2i+1, one for each orientation.
# Each row reads as follows: [ 2i.head , (2i+1).head , 2i.next , (2i+1).next]
# @example A triangulated sphere with three punctures can be given by the following [[DCEL]]:
# > $S3 = new Matrix<Int>([ [1,0,2,5],[2,1,4,1],[0,2,0,3] ]);
# > $s = new HyperbolicSurface(DCEL=>$S3);
property DCEL : DoublyConnectedEdgeList;
# Penners lambda lengths, sometimes called Penner coordinates, of the hyperbolic surface.
# Robert C. Penner. Decorated Teichmüller Theory. QGM Master Class Series. European Mathematical Society, Zürich, 2012.
# They are given by one positive rational for each edge of the triangulation, ordered in the sense of the triangulation [[DCEL]].
property PENNER_COORDINATES : Vector<Rational>;
# Each Delaunay triangulations of the surface can be obtained by successively flipping edges of the triangulation [[DCEL]].
# The k-th flip word is a list of integers (the indices of the edges) that describe which edge flips produce the k-th Delaunay triangulation.
# Note that the k-th Delaunay triangulation also corresponds to the k-th maximal cone of the [[SECONDARY_FAN]].
property FLIP_WORDS : Array< List<Int> >;
# In order to compute [[GKZ_VECTORS]] (or a [[secondary_polyhedron]]) one needs to specify a point on the surface, see
# M. Joswig, R. Löwe, and B. Springborn. Secondary fans and secondary polyhedra of punctured Riemann surfaces. arXiv:1708.08714.
# This point is specified by choosing a pair of rationals (p,x) that determine how the (decorated) 0th half edge is lifted to a geodesic in H^2.
# The covering is chosen in such a way that the horocycle at infinity is the vertical line at height p^2 and
# the lifted 0th half edge goes from infinity to the point x at the ideal boundary.
property SPECIAL_POINT : Pair<Rational, Rational>;
#property SECONDARY_FAN defined in fan/rules/fan_properties.rules
# @category Other
# Computes an approximation of the GKZ vectors of a hyperbolic surface.
# The approximation depends on the parameter //depth// that restricts the depth of the (covering) triangles that are summed over in the definition of the GKZ vectors.
# @param Int depth
# @return Matrix<Rational>
# @example
# > $T = new Matrix<Int>([[0,0,6,5],[0,0,1,10],[0,0,8,2],[1,0,11,4],[1,0,7,3],[1,0,9,0]]);
# > $s = new HyperbolicSurface(DCEL=>$T, PENNER_COORDINATES=>[1,1,1,1,1,1], SPECIAL_POINT=>[1,0]);
# > print $s->GKZ_VECTORS(2);
# | 1 240509/380250 517/1950
# | 1 98473/694950 915006978873/1469257962050
user_method GKZ_VECTORS($){
my $self = shift;
my $depth = shift;
gkz_vectors($self, $depth);
}
rule initial : {
my $dd = $this->DCEL;
my $pc = $this->PENNER_COORDINATES;
die "incompatible DCEL and PENNER_COORDINATES"
unless ($dd->getNumEdges == $pc->dim);
}
precondition : exists(DCEL);
precondition : exists(PENNER_COORDINATES);
}
# Local Variables:
# mode: perl
# cperl-indent-level:3
# indent-tabs-mode:nil
# End:
|