-
-
Notifications
You must be signed in to change notification settings - Fork 598
HyperbolicGeodesicPD.plot can be wrong for CDF coordinates #32362
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
Comments
Output image from example code |
comment:1
Attachment: geodesic_bug.png The current implementation of hyperbolic geodesics Any geodesic The example geodesic has endpoints The corresponding complete geodesic is a Converting back to the disc model, the effect |
comment:2
Aha! I suspect it's possible to find the ideal endpoints of a disk model geodesic in a more numerically stable way. I can work on a test implementation. If the test implementation works well, do you know what we'd have to do to incorporate it into |
This comment has been minimized.
This comment has been minimized.
comment:3
Replying to @Vectornaut:
Good!
Yes. |
Changed keywords from none to hyperbolic, geodesic, plot, precision |
Finding ideal endpoints of geodesics on the Poincaré disk: example implementation |
Attachment: hyperbolic_geodesic_PD.sage.gz Attachment: drawing-geodesics.pdf.gz Finding ideal endpoints of geodesics on the Poincaré disk: method explanation |
comment:4
I just attached an example implementation. I've done some basic tests, but no systematic challenges or comparison with the current implementation (via the upper half-plane). |
comment:6
Maybe unrelated or not (If you think it's unrelated I can open a new ticket on this) I've just discovered working on ticket [ticket:23427] that ideal endpoints on PD geodesics can be mapped to imag()<0 points which is an error, and when plotted often draw a geodesic int the lower half plane.
|
Not being aware of this discussion I reported a similar issue here. The one line change I mentioned there seems to me to fix the problem both in my use cases and in the case reported in the top post above. Maybe avoiding testing of exact equality of floting point numbers in the UHP code would be a good thing to do to improve the situation? |
I found a case with similar symptoms, but which I think reflects a separate bug of the same type: r = exp((pi*I/2).n())
G = hyperbolic_triangle(0, r, r*(1 + I)/2, model='PD', fill=True, alpha=.3)
G._show_axes = False
show(G) (The central angle should be pi/4.) I think this is the root cause PD = HyperbolicPlane().PD()
UHP = HyperbolicPlane().UHP()
r = exp((pi*I/2).n())
p = PD.get_point(r)
UHP(p) which yields if abs(x - I) < EPSILON: (and add |
This illustrates the wrong plotting:
The first two pictures show the expected output: a straight line from
0
to0.7*I
. The last picture shows the buggy output: a short arc between two points near0.7*I
. The printed output describes the arc in the buggy picture.CC: @slel @sagetrac-jhonrubia6 @orlitzky
Component: geometry
Keywords: hyperbolic, geodesic, plot, precision
Issue created by migration from https://trac.sagemath.org/ticket/32362
The text was updated successfully, but these errors were encountered: