Let me advertize that sage-flatsurf
(https://github.com/flatsurf/sage-flatsurf) has an implementation of
the hyperbolic plane with exact coordinates

The following code
```
from flatsurf import HyperbolicPlane
H = HyperbolicPlane(AA)
z0 = H.point(2*AA(2).sqrt()/3 - 1, 4/6, model='half_plane')
z1 = H.point(-1, 0, model='half_plane')
print(z0)
g = H.geodesic(z0, z1)
print(g.start())
print(g.end())
```
gives the correct
```
-0.05719095841793663? + 0.6666666666666667?*I
0.4142135623730951?
-1
```

Best
Vincent

On Tue, 13 Aug 2024 at 17:50, dmo...@deductivepress.ca
<dmor...@deductivepress.ca> wrote:
>
> This was previously reported as issue #32362 on github, so any further 
> discussion should take place there.  The solution suggested there is to have 
> sagemath calculate endpoints in the Poincare disk model, instead of in the 
> upper half plane model.
>
> On Sunday, August 11, 2024 at 7:45:18 AM UTC-4 Hakan Granath wrote:
>>
>> Hi,
>>
>> There is a bug in hyperbolic_polygon which happens quite rarely, but for 
>> example
>>
>>     l = [-1, 1, -0.0571909584179366 + 0.666666666666667*I]
>>     hyperbolic_polygon(l, model='PD')
>>
>> results in an incorrectly drawn hyperbolic triangle. It seems to be a subtle 
>> numerical issue; if the last element of l is replaced with 
>> -0.0571909584179366 + 0.667*I everything looks fine.
>>
>> Digging a bit further, there seems to be an underlying issue here:
>>
>>     PD = HyperbolicPlane().PD()
>>     z0 = CC(-0.0571909584179366 + 0.666666666666667*I)
>>     z1 = CC(-1)
>>     PD.get_geodesic(z0, z1).ideal_endpoints()
>>
>> yields the erroneous result
>>
>>     [Boundary point in PD -9.52420782539595e-17 + 1.00000000000000*I,
>>      Boundary point in PD -0.800000000000000 + 0.600000000000000*I]
>>
>> (the second endpoint should be -1). Because of this I am suspicious of lines 
>> 1267 - 1269 in src/sage/geometry/hyperbolic_space/hyperbolic_geodesic.py. 
>> There we have the code
>>
>>     # We could also have a vertical line with two interior points
>>     if x1 == x2:
>>         return [M.get_point(x1), M.get_point(infinity)]
>>
>> Maybe the if statement should instead be something like
>>
>>     if abs(x1 - x2) < EPSILON:
>>
>> Best regards,
>>
>> Håkan Granath
>>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/baff7122-26e0-40a1-8bbf-0f2fc36e88d2n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAGEwAAn%2BzU_XE2H%3DgDX0Vvvarfh-UoSGwU0YX5eDrm2rEFtqWw%40mail.gmail.com.

Reply via email to