Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MutableOrientedHyperbolicSurface #243

Draft
wants to merge 71 commits into
base: master
Choose a base branch
from

Conversation

saraedum
Copy link
Member

@saraedum saraedum commented Jul 5, 2023

Checklist

  • Added an entry in doc/news/.
  • Added a test for this change.
  • Added new .py files to the documentation in doc/geometry or doc/graphical.
TODO
  • Printing of segments as "geodesic ∩ half-plane ∩ half-plane" is very noisy. It's usually easier to parse "point → point".
  • edges() of polygons with marked vertices should return the individual segments surrounding a marked vertex Fix edges() of hyperbolic convex polygons with marked vertices #244
  • Check that the assumption that a polygon with n edges must have n vertices is not used anymore (in areas that could affect hyperbolic surfaces.)
  • Add polygons mod n formed by inserting orbifold points in a followup PR.
Demo
sage: from flatsurf import HyperbolicPlane
sage: H = HyperbolicPlane(QQ)
sage: from flatsurf import MutableOrientedHyperbolicSurface
sage: S = MutableOrientedHyperbolicSurface(H)
sage: S.add_polygon(H.polygon([
....:     H.vertical(3).left_half_space(),
....:     H.vertical(1).right_half_space(),
....:     H.half_circle(2, 4).left_half_space(),
....:     H.half_circle(2, 16).right_half_space(),
....: ]))
0
sage: S.add_polygon(H.polygon([
....:     H.vertical(3).left_half_space(),
....:     H.vertical(1).right_half_space(),
....:     H.half_circle(2, 4).left_half_space(),
....:     H.half_circle(2, 16).right_half_space(),
....: ]))
1
sage: S.polygon(0).edges()
{(2/5, 3/5) → (6/13, 11/13), (6/13, 11/13) → (6/25, 23/25), (6/25, 23/25) → (2/17, 15/17), (2/17, 15/17) → (2/5, 3/5)}
sage: S.glue((0, 0), (1, 0))
sage: S.glue((0, 1), (1, 3))
sage: S.glue((0, 2), (1, 2))
sage: S.glue((0, 3), (1, 1))
sage: S.set_immutable()
sage: S
Hyperbolic Surface with 2 orbifold points built from 2 quadrilaterals
sage: S.vertices()
{Vertex 0 of polygon 0,
 Vertex 0 of polygon 1,
 Vertex 2 of polygon 0,
 Vertex 2 of polygon 1}
sage: S.orbifold_points()
{Vertex 0 of polygon 0, Vertex 0 of polygon 1}
sage: [v.angle(numerical=True) for v in S.vertices()]
[0.419569376744834, 0.333333333333334, 0.333333333333334, 0.419569376744834]
sage: S.plot()

image

@github-actions
Copy link

github-actions bot commented Jul 7, 2023

Documentation preview for this PR is ready! 🎉
Built with commit: a907243

we are not doing any layouting here so the result is probably mostly
useless.
we need to make sure that point coordinates are hashable (for the
representatives set.) Also, it's probably helpful that all points have
the same structure (and not some are tuples say.)

If there's a performance impact, we might revisit the implementation
later but points are not used much currently anyway.
This reverts commit 433999d.

We must not normalize points such as the ones that come from hyperbolic
points since there coordinates are not always available.
@saraedum
Copy link
Member Author

Can we call _layout_one_trajectory several times (ie layout several trajectories)?

You can actually call gs.layout(algorithm="trajectory", trajectory=L) several times with different trajectories I think.

@videlec
Copy link
Collaborator

videlec commented Apr 23, 2024

A useful method at the level of surfaces glued from polygon is is_orbifold() (ie whether all angles are of the form $2\pi/n$ with $n \in {1,2,\ldots}$ (one can allow $+\infty$ as well in the hyperbolic settings to mean cusp). If the surface is an orbifold, then it is a global quotient $\Gamma \backslash \mathbb{H}^2$ (hyperbolic setting) or $\Gamma \backslash \mathbb{R}^2$ (flat setting).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants