Constructing the square:

{{{id=9| from flatsurf.geometry.polygon import Polygons /// }}}

The following is the parent for polygons with coordinates in the field K.

Remarks:

To construct a polygon, use the parent to build the parent. Passing a list of edge vectors will produce the polygon. The edge vectors must sum to zero.

{{{id=5| square = Polygons(QQ)([(1,0), (0, 1), (-1,0), (0, -1) ]) print(square) /// Polygon: (0, 0), (1, 0), (1, 1), (0, 1) }}} {{{id=79| square.plot() /// }}}

Picture of the square with edge labels.

Defining the staircase

{{{id=47| from flatsurf.geometry.surface import Surface from flatsurf import * /// }}} {{{id=19| class StaircaseSurface(Surface): r"""The Staircase surface.""" def __init__(self): # Store the square: self._square = Polygons(QQ)([(1,0), (0, 1), (-1,0), (0, -1)]) # The surface will be defined by polygons with vertices with rational coordinates, # will have a base label as zero, and will be infinite Surface.__init__(self, QQ, 0, finite=False) def polygon(self, lab): return self._square def opposite_edge(self, p, e): if e==0 or e==2: if p%2==0: return p-1, (e+2)%4 else: return p+1, (e+2)%4 else: if p%2==0: return p+1, (e+2)%4 else: return p-1, (e+2)%4 /// }}}

We think of this surface as a TranslationSurface.

{{{id=48| s = TranslationSurface(StaircaseSurface()) /// }}} {{{id=24| gs = s.graphical_surface() /// }}} {{{id=49| gs.plot() /// }}} {{{id=52| gs.make_adjacent_and_visible(0,1) gs.make_adjacent_and_visible(1,2) /// }}} {{{id=58| gs.plot() /// }}} {{{id=50| gs = s.graphical_surface() for i in range(3): gs.make_adjacent_and_visible(2*i,1) gs.make_adjacent_and_visible(2*i+1,2) /// }}} {{{id=51| gs.plot() /// }}}

Straight-Line Flow

{{{id=63| from flatsurf.geometry.tangent_bundle import SimilaritySurfaceTangentBundle /// }}}

We will flow in a direction of slope given by the golden mean, phi. This builds a number field and defines phi.

{{{id=75| K. = NumberField(x**2-x-1, embedding=1.6) /// }}} {{{id=65| v=s.tangent_vector(4,(0,0),(1,phi),ring=K) /// }}} {{{id=67| traj=v.straight_line_trajectory() traj.flow(1000) /// }}} {{{id=68| from flatsurf.graphical.straight_line_trajectory import GraphicalStraightLineTrajectory /// }}} {{{id=69| gtraj = GraphicalStraightLineTrajectory(gs,traj) /// }}} {{{id=71| gs.plot()+gtraj.plot() /// }}} {{{id=74| K. = NumberField(x**2 - 2, embedding=1.4) v=s.tangent_vector(4,(0,0),(1,rt2),ring=K) /// }}} {{{id=76| traj = v.straight_line_trajectory() traj.flow(1000) /// }}} {{{id=77| gtraj = GraphicalStraightLineTrajectory(gs,traj) /// }}} {{{id=78| gs.plot()+gtraj.plot() /// }}}