ddg.geometry.spherical_models module

Spherical geometry module.

class ddg.geometry.spherical_models.ProjectiveModel(dimension)[source]

Bases: _ProjectiveSubgeometry

Spherical geometry as a subgeometry of Möbius geometry.

Model space

The model space is the Möbius quadric with matrix diag([1,...,1, -1]).

Representation of objects

Geometric objects are represented as Möbius spheres, i.e. Quadric objects contained in the Möbius quadric.

Parameters:
dimensionint

Notes

This class supports comparison with ==. Two geometries are equal if and only if they have the same type and dimension.

This class also supports the in operator to check whether a point is in the model space.

Attributes:
dimensionint
property fixed_point

Point inside the Möbius quadric used to compute the metric.

This is the origin with representative [0,…,0, 1].

Returns:
ddg.geometry.Point
d(v, w)[source]

Spherical metric

Given by the formula

<x, y> / (<x, p> <y, p>) = -2 * sin^2(d([x],[y]) / 2)

Where p is some point inside the quadric. In our case, we take the origin e_n+2.

Parameters:
v, wddg.geometry.Point or array_like of shape (n,)
Returns:
float
property absolute

The absolute quadric with matrix diag([1,...,1, -1]).

Returns:
ddg.geometry.Quadric
property ambient_dimension
angle(s1, s2)

Angle between two Möbius spheres.

Parameters:
s1, s2ddg.geometry.Quadric

Möbius spheres.

Returns:
float
cayley_klein_distance(v, w)

Alias for self.absolute.cayley_klein_distance.

cayley_klein_sphere(center, radius, subspace=None, atol=None, rtol=None)

Create a Cayley-Klein sphere.

Parameters:
centerddg.geometry.Point or numpy.ndarray of shape (n+1,)
radiusfloat

Cayley-Klein radius

subspaceddg.geometry.Subspace or list of numpy.ndarray of shape (k,)
(default=None)
Returns:
ddg.geometry.spheres.CayleyKleinSphere
elliptic()[source]

Corresponding projective model of elliptic geometry.

property elliptic_point
property elliptic_subspace
euclidean()[source]

Corresponding projective model of Euclidean geometry.

property euclidean_point
property euclidean_subspace
from_elliptic(object_, embedded=False)[source]

Alias for elliptic_models.projective_to_moebius()

from_euclidean(object_, embedded=False)[source]

Alias for euclidean_models.projective_to_moebius()

from_hyperbolic(object_, embedded=False)[source]

Alias for hyperbolic_models.projective_to_hemisphere()

from_hyperbolic_half_space(object_, embedded=False)[source]

Alias for hyperbolic_models.half_space_to_hemisphere()

from_hyperbolic_poincare(object_, embedded=False)[source]

Alias for hyperbolic_models.poincare_to_projective()

from_lie(object_, embedded=False)[source]
from_paraboloid(object_)[source]

Alias for paraboloid_to_projective_and_back()

generalized_cayley_klein_sphere(center, radius, subspace=None, atol=None, rtol=None)

Create a generalized Cayley-Klein sphere.

Parameters:
centerddg.geometry.Point or numpy.ndarray of shape (n+1,)
radiusfloat

Generalized radius

subspaceddg.geometry.Subspace or list of numpy.ndarray of shape (k,)
(default=None)
Returns:
ddg.geometry.spheres.GeneralizedCayleyKleinSphere
hyperbolic()[source]

Corresponding projective model of hyperbolic geometry.

hyperbolic_half_space()[source]

Corresponding Poincare disk model of hyperbolic geometry.

hyperbolic_poincare()[source]

Corresponding Poincare disk model of hyperbolic geometry.

property hyperbolic_point
property hyperbolic_subspace
inner_product(v, w)

Alias for self.absolute.inner_product.

lie()[source]

Corresponding projective model of Lie geometry.

paraboloid()[source]

Corresponding paraboloid model of Möbius geometry.

pole_of_sphere(sphere)

Return pole corresponding to sphere.

Parameters:
sphereddg.geometry.Quadric
Returns:
ddg.geometry.Subspace
sphere_from_pole(subspace) Quadric

Get a Möbius sphere from its pole.

Returns intersection of Q and Q.polarize(subspace), where Q is the Möbius quadric.

Parameters:
subspaceddg.geometry.Subspace
Returns:
ddg.geometry.Quadric
to_elliptic(object_, embedded=False)[source]

Alias for elliptic_models.moebius_to_projective()

to_euclidean(object_, embedded=False)[source]

Alias for euclidean_models.moebius_to_projective()

to_hyperbolic(object_, embedded=False)[source]

Alias for hyperbolic_models.hemisphere_to_projective()

to_hyperbolic_half_space(object_, embedded=False)[source]

Alias for hyperbolic_models.hemisphere_to_half_space()

to_hyperbolic_poincare(object_, embedded=False)[source]

Alias for hyperbolic_models.projective_to_poincare()

to_lie(object_, embedded=False)[source]
to_paraboloid(object_)[source]

Alias for paraboloid_to_projective_and_back()