ddg.conversion.nets.geometry.spheres module

ddg.conversion.nets.geometry.spheres.sphere_to_smooth_net(sphere, affine_component=-1)[source]
ddg.conversion.nets.geometry.spheres.euclidean_sphere_to_smooth_net(s, affine_component=-1)[source]

Converts a two-dimensional sphere in three-dimensional ambient space to a smooth net.

Parameters:
sddg.Sphere

A two-dimensional sphere in three-dimensional projective space.

Returns:
ddg.datastructures.nets.SmoothNet

A parameter-dependent smooth net.

Raises:
ValueError

If the given sphere is not a two-dimensional sphere in three-dimensional projective space.

NotImplementedError

If center of the sphere is a point at infinity.

Notes

The resulting SmoothNet object depends the radius and the center of the sphere as parameters.

ddg.conversion.nets.geometry.spheres.euclidean_circle_to_smooth_net(c, affine_component=-1)[source]

Converts a circle in n-dimensional space to a smooth curve.

Parameters:
cddg.Sphere

A one-dimensional sphere in n-dimensional projective space.

Returns:
ddg.datastructures.nets.SmoothCurve

A parameter-dependent smooth curve.

Raises:
ValueError

If the given sphere is not a circle in n-dimensional projective space.

NotImplementedError

If center of the circle is a point at infinity.

Notes

The resulting SmoothCurve object depends on the following parameters: the radius of the circle, the center of the circle and optionally (if the ambient dimension is greater than 2) the normals of its defining plane.

ddg.conversion.nets.geometry.spheres.cayley_klein_sphere_to_smooth_net(sphere, affine_component=-1)[source]

Convert Cayley-Klein sphere to smooth net.

This function works by first converting the sphere to a quadric and then using quadric_to_smooth_net. For this to work, the sphere’s geometry must implement metric_to_cayley_klein_distance and the resulting quadric type must be convertible to a smooth net.

Parameters:
sphereSphere
affine_component: int (default=-1)
Returns:
SmoothNet