ddg.geometry.conversion module

Conversion module for geometries.

This module contains functions for conversion between different types of geometric objects.

ddg.geometry.conversion.quadric_to_euclidean_sphere(quadric, atol=None, rtol=None)[source]

Convert quadric to a Euclidean sphere, if it is one.

Parameters:
quadricQuadric
atol, rtolfloat (default=None)

If None is given, the global defaults are used. See ddg.nonexact for details.

Returns:
Sphere
Raises:
ValueError

If quadric is not a sphere.

ddg.geometry.conversion.euclidean_sphere_to_quadric(sphere)[source]

Convert Euclidean sphere to quadric

Parameters:
sphereSphere
Returns:
Quadric
ddg.geometry.conversion.cayley_klein_sphere_to_quadric(sphere)[source]

Convert Cayley-Klein sphere to quadric.

Parameters:
sphereCayleyKleinSphere or MetricCayleyKleinSphere
Returns:
Quadric
ddg.geometry.conversion.generalized_cayley_klein_sphere_to_quadric(sphere)[source]

Convert generalized Cayley-Klein sphere to quadric.

Parameters:
sphereGeneralizedCayleyKleinSphere
Returns:
quadric
ddg.geometry.conversion.quadric_to_subspaces(quadric)[source]

If a quadric is equal to a finite collection of subspaces, convert it.

This is the case if and only if Q = quadric.matrix is semidefinite or its rank is less than or equal to 2. In the first case, return ker(Q). Otherwise, return join(ker(Q), P1) and join(ker(Q), P2), where P1, P2 are the two points making up the non-degenerate part of the quadric.

Parameters:
quadricQuadric
Returns:
tuple of Subspace

Notes

No non-degenerate quadric with ambient dimension at least 2 is equal to a collection of subspaces. A degenerate quadric Q is the join of its kernel with its non-degenerate part, i.e. the quadric obtained by restricting the quadratic form to a subspace complementary to the kernel. For this set to be a collection of subspaces, the non-degenerate part must itself be a collection of subspaces. This is only possible if it is contained in a line (i.e. the rank of Q is 2) or it is empty (i.e. Q is positive semidefinite).