Skip to content

counting ideal points of a hyperbolic line #9

Answered by cduck
mckvv asked this question in Q&A
Discussion options

You must be logged in to vote

I'm glad it's useful to you. You can find the ideal points of a line by creating a Line with segment=False (an infinite length line) and asking for its start and end points:

from hyperbolic.poincare import shapes

point1 = shapes.Point.fromEuclid(-0.2, 0.1)
point2 = shapes.Point.fromEuclid(0.2, 0.5)

# Calculate ideal points
line = shapes.Line.fromPoints(*point1, *point2, segment=False)
ideal1 = line.startPoint()  # The ideal point closer to point1
ideal2 = line.endPoint()    # The ideal point closer to point2

# Draw
from hyperbolic import euclid
import drawSvg as draw
d = draw.Drawing(2.1, 2.1, origin='center')
d.draw(euclid.shapes.Circle(0, 0, 1), fill='#eee')
d.draw(line, hwidth=1/8, f…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@mckvv
Comment options

@cduck
Comment options

@mckvv
Comment options

@cduck
Comment options

Answer selected by cduck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #7 on August 09, 2021 16:35.