pub struct PoincareDisk { /* private fields */ }Expand description
The Poincaré disk model of hyperbolic space.
This structure represents the hyperbolic space itself and provides operations for working with hyperbolic points.
Implementations§
Source§impl PoincareDisk
impl PoincareDisk
Sourcepub fn curvature(&self) -> FixedPoint
pub fn curvature(&self) -> FixedPoint
Get the curvature of the hyperbolic space.
Sourcepub fn origin(&self) -> HyperbolicPoint
pub fn origin(&self) -> HyperbolicPoint
Create a point at the origin of the disk.
Sourcepub fn point_from_euclidean(&self, coords: FixedVector) -> HyperbolicPoint
pub fn point_from_euclidean(&self, coords: FixedVector) -> HyperbolicPoint
Create a new point from Euclidean coordinates, projecting to the disk.
Sourcepub fn point_from_coords(&self, coords: FixedVector) -> HyperbolicPoint
pub fn point_from_coords(&self, coords: FixedVector) -> HyperbolicPoint
Create a new point from FixedPoint coordinates, projecting to the disk.
Sourcepub fn point_from_f32_slice(&self, coords: &[f32]) -> HyperbolicPoint
pub fn point_from_f32_slice(&self, coords: &[f32]) -> HyperbolicPoint
Create a new point from f32 coordinates, projecting to the disk (boundary API).
Sourcepub fn project(&self, point: &FixedVector) -> HyperbolicPoint
pub fn project(&self, point: &FixedVector) -> HyperbolicPoint
Project a Euclidean point to the hyperbolic space.
Sourcepub fn distance(&self, p1: &HyperbolicPoint, p2: &HyperbolicPoint) -> FixedPoint
pub fn distance(&self, p1: &HyperbolicPoint, p2: &HyperbolicPoint) -> FixedPoint
Compute the hyperbolic distance between two points.
Sourcepub fn midpoint(
&self,
p1: &HyperbolicPoint,
p2: &HyperbolicPoint,
) -> HyperbolicPoint
pub fn midpoint( &self, p1: &HyperbolicPoint, p2: &HyperbolicPoint, ) -> HyperbolicPoint
Find the hyperbolic midpoint between two points.
Sourcepub fn point_at_distance_from_origin(
&self,
direction: &FixedVector,
distance: FixedPoint,
) -> HyperbolicPoint
pub fn point_at_distance_from_origin( &self, direction: &FixedVector, distance: FixedPoint, ) -> HyperbolicPoint
Create a point at the specified radial distance from the origin.
Sourcepub fn point_from_hyperbolic_coords(
&self,
r: FixedPoint,
angles: &[FixedPoint],
) -> HyperbolicPoint
pub fn point_from_hyperbolic_coords( &self, r: FixedPoint, angles: &[FixedPoint], ) -> HyperbolicPoint
Create a point at the specified hyperbolic coordinates.
Hyperbolic coordinates are specified as (r, θ₁, θ₂, …, θₙ₋₁) where:
- r is the hyperbolic distance from the origin
- θᵢ are angular coordinates (similar to spherical coordinates)
Trait Implementations§
Source§impl Clone for PoincareDisk
impl Clone for PoincareDisk
Source§fn clone(&self) -> PoincareDisk
fn clone(&self) -> PoincareDisk
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more