"""Lie geometry module.
"""
import numpy as np
from ddg.geometry.geometry_model_templates import CayleyKleinGeometry
from ddg.geometry.quadrics import Quadric
__all__ = ["ProjectiveModel"]
[docs]class ProjectiveModel(CayleyKleinGeometry):
"""Lie geometry.
.. rubric:: Model space
The model space is the quadric with matrix `diag([1,...,1, -1, -1])` in
RP^{n+2}.
.. Representation of objects
Points in this quadric correspond to oriented hyperspheres and
hyperplanes in R^n.
Parameters
----------
dimension : int
Attributes
----------
dimension : int
"""
@property
def absolute(self):
"""The absolute quadric with matrix ``diag([1,...,1, -1, -1])``.
Returns
-------
Quadric
"""
diag = np.ones(self.dimension + 3)
diag[-1] = diag[-2] = -1
return Quadric(np.diag(diag))
def __contains__(self, point):
return point in self.absolute