Explore the hyperbolic space using this module. Checkout the doc for examples.
An ideal point is a point at infinity, uniquely defined by an angle.
Returns if two point can be considered equal.
Get the distance between two points
Distance to the origin
If you want to construct a tiling in the hyperbolic space, then the length of the polygon specifies how many polygons fit around a point.
If you look up tilings, you will usually find a Schläfli symbol {p,q}. In that case p = vertices, q = polygonsAroundAPoint.
The resulting length is for BeltramiCoords
We define a line by two ideal points.
An ideal point is a point at infinity and can be represented by an angle
A hyper ideal point is a point that only exists in the euclidean projection of the hyperbolic plane into the Beltrami–Klein model.
A line segment is defined by two points
Any line except lines going through the origin, can be associated by a unique hyper ideal point.
Constructs a line from two ideal points
lineFromIdealPoints : IdealPoint -> IdealPoint -> Line
lineFromIdealPoints =
Tuple.pairConstructs a line segment to a point
lineSectionTo : BeltramiPoint -> BeltramiPoint -> LineSegment
lineSectionTo =
Tuple.pairconstructs a line from two points
Convert a line segment into a line
Construct the midpoint of a line
Get the midpoint of a line segment
Construct a line using an hyper ideal point
Point as to lie on the line
Two lines may intersect at exactly one point
Construct a bisector through a point
Gyrovector in Poincare-Model
Creates a vector from two points. The length of the vector
Negate a vector
Using the Möbius Addition to add two vectors in the poincare disc
Return the length of a vector
Addition for Gyrovectors in the Beltrami Disc Model.
Rotate the vector clockwise
Rotate a point clockwise around the origin
scale a vector by a factor
Constructs a given amount of point along a line
Constructs a given amount of point along a line segment
Constructs a point using polar coordinates.
Projects points from euclidean space into hyperbolic space. However, you can not expect the proportions to stay the same.
Points further out experience more distortion.
Project Hyperbolic points to the Beltrami klein disc
Project Hyperbolic points to the Poincare disc
Converts Beltrami Coordinates into Axial coordinates.
Converts Axial coordinates into Beltrami Coordinates.
Module for working with hyperbolic geometry. Uses the Beltrami–Klein model.
Ideal points have Beltrami coordinates with length 1.
Hyper ideal points have Beltrami coordinates with length > 1.