ddg.geometry.abc module
- class ddg.geometry.abc.ProjectiveObject[source]
Bases:
ABCABC for geometric objects that are subsets of a Projective space RP^n.
- ambient_dimension: int
- class ddg.geometry.abc.Embeddable[source]
Bases:
ProjectiveObjectABC for objects that can be embedded in subspaces in a higher-dimensional projective space.
- abstract embed(subspace=None)[source]
The embedded object.
We can embed a subset X of n-dimensional projective space into m-dimensional space (where m >= n) by choosing an n-dimensional subspace S in RP^m together with a basis B. We then interpret the original homogeneous coordinates as coordinates w.r.t. this basis B.
More concretely: If M is the
matrixof S, we defineX.embed(S) := { [M @ x] | [x] in X }.X.embed(S)must be the same kind of object as X, for example if X is a euclidean sphere, the basis M must be chosen so thatX.embed(S)is also a euclidean sphere.- Parameters:
- subspaceddg.geometry.Subspace (default=None)
Subspace in m-dimensional ambient space whose dimension is the ambient dimension of
self(where m >= n). The homogeneous coordinates of points are used as cordinates w.r.t. the given basis ofsubspace.The default is the coordinate hyperplane {x_n+1 = 0} in (n+1)-dimensional space, where n is the ambient dimension of
self. The basis is the standard basis with the second to last basis vector missing.
- Returns:
- type(self)
Object in m-dimensional ambient space contained in
subspace.
- Raises:
- ValueError
If embedding w.r.t. the given basis would result in an object of a different type.
- abstract unembed(subspace=None)[source]
Inverse of
embed.- Parameters:
- subspaceddg.geometry.Subspace (default=None)
k-dim. subspace to treat as the new ambient space. coordinates of points will be computed w.r.t. the given basis of
subspace.The default is the coordinate hyperplane {x_n = 0} which will fail if the object is not contained in this subspace.
- Returns:
- type(self)
Object in
k-dim. ambient space.
- Raises:
- ValueError
If object is not contained in
subspace.If coordinate computation would result in an object of a different type.
- abstract at_infinity()
Whether the object is contained in the hyperplane at infinity.
- Returns:
- bool
- ambient_dimension: int
- class ddg.geometry.abc.QuadricConvertible[source]
Bases:
ABCABC for objects that can be converted to quadrics.
- class ddg.geometry.abc.CayleyKleinSphereFactory[source]
Bases:
ABCFactory class for (generalized) Cayley-Klein spheres but not Metric Cayley-Klein spheres, use SphereFactory for those.
- abstract cayley_klein_sphere(center, radius, subspace=None, atol=None, rtol=None)[source]
Cayley-Klein sphere factory method.
- Parameters:
- centerddg.geometry.Point
- radiusfloat
- subspaceddg.geometry.Subspace (default=None)
- atol, rtolfloat (default=None)
- Returns:
- ddg.geometry.spheres.CayleyKleinSphere
- abstract generalized_cayley_klein_sphere(center, radius, subspace=None, atol=None, rtol=None)[source]
Generalized Cayley-Klein sphere factory method.
- Parameters:
- centerddg.geometry.Point
- radiusfloat
- subspaceddg.geometry.Subspace (default=None)
- atol, rtolfloat (default=None)
- Returns:
- ddg.geometry.spheres.GeneralizedCayleyKleinSphere