ddg.geometry.spherical_models module
Spherical geometry module.
- class ddg.geometry.spherical_models.ProjectiveModel(dimension)[source]
Bases:
_ProjectiveSubgeometrySpherical 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 anddimension.This class also supports the
inoperator 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
- property elliptic_point
- property elliptic_subspace
- property euclidean_point
- property euclidean_subspace
- from_euclidean(object_, embedded=False)[source]
Alias for
euclidean_models.projective_to_moebius()
- 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
- property hyperbolic_point
- property hyperbolic_subspace
- inner_product(v, w)
Alias for self.absolute.inner_product.
- 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
QandQ.polarize(subspace), whereQis the Möbius quadric.- Parameters:
- subspaceddg.geometry.Subspace
- Returns:
- ddg.geometry.Quadric
- to_euclidean(object_, embedded=False)[source]
Alias for
euclidean_models.moebius_to_projective()
- to_paraboloid(object_)[source]
Alias for
paraboloid_to_projective_and_back()