Developer’s guide: Geometries
Creating new geometries
There aren’t any hard restrictions on what a geometry model class should satisfy. You can see if one of the classes in geometry_model_templates provides a good framework. If yes, You need to define the following methods:
For
MetricGeometry:d,__contains__For
CayleyKleinGeometry: anabsoluteproperty or attribute,__contains__For
MetricCayleyKleinGeometry: anabsoluteproperty or attribute,metric_to_cayley_klein_distance,cayley_klein_distance_to_metric.
All of these are initialized with an integer dimension, meaning the intuitive dimension of the model space and not the dimension of the ambient projective space of the model. There is a default implementation of __eq__, but you might want to extend it if your geometry contains additional data that should be checked.