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:
- 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, wPoint or array_like of shape (n,)
- Returns:
- float
- property ambient_dimension
- 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:
- centerPoint or numpy.ndarray of shape (n+1,)
- radiusfloat
Cayley-Klein radius
- subspaceSubspace or list of numpy.ndarray of shape (k,) (default=None)
- Returns:
- CayleyKleinSphere
- generalized_cayley_klein_sphere(center, radius, subspace=None, atol=None, rtol=None)
Create a generalized Cayley-Klein sphere.
- Parameters:
- centerPoint or numpy.ndarray of shape (n+1,)
- radiusfloat
Generalized radius
- subspaceSubspace or list of numpy.ndarray of shape (k,) (default=None)
- Returns:
- GeneralizedCayleyKleinSphere
- inner_product(v, w)
Alias for self.absolute.inner_product.