JuliaManifolds / Manifolds.jl

Manifolds.jl provides a library of manifolds aiming for an easy-to-use and fast implementation.
https://juliamanifolds.github.io/Manifolds.jl
MIT License
368 stars 54 forks source link

Poincaré hyperbolic graphics #752

Open cormullion opened 4 hours ago

cormullion commented 4 hours ago

An idle question - I was browsing your fulsome documentation and saw this image:

https://juliamanifolds.github.io/manifolds/stable/manifolds/hyperbolic-041e6c97.svg

and I started to wonder whether images like this

IMG_7710

would be possible to make with Manifolds.jl?

kellertuer commented 3 hours ago

You indeed can. I would not consider any of us an expert in Reciepts, and by now maybe would prefer to write a Makie one as well, but we have as one of the presentations of the Hyperbolic space the Poincaré ball – which for the 1D case boils down to the Poincaré disc you just showed. Its reciept is illustrated at exactly the place you find the graphics you linked https://juliamanifolds.github.io/Manifolds.jl/stable/manifolds/hyperbolic.html#poincare_ball_plot

You can also just see there how to generate the necessary points. The curves you see in that plot are generated with the shortest_geodesic(M, p, q, t) function for t between 0 (at p) and 1 (at q) as the connecting curve. If you have a point and a direction, there is also geodesic(M, p, X, t) that starts in direction X.

The one thing I do not know – but that is more of a Makie-Question is how to fill parts of all the curves you would generate, because given two of the geodesics (shortest or based on the direction) I am not so sure how to compute whether and where they meet.

mateuszbaran commented 2 hours ago

We currently only have the geodesic part and Poincare disc representation of the functionality needed to render hyperbolic tilings. The main part is cell generation and rendering, which would have to be done from scratch. I'd rather suggest using an existing library such as https://gitpages.physik.uni-wuerzburg.de/hypertiling/hyperweb/ .

cormullion commented 2 hours ago

Thank you both.