ddg.conversion.halfedge.geometry.spheres module

ddg.conversion.halfedge.geometry.spheres.sphere_to_icosphere(sphere, subdivision_steps=4)[source]

Converts a two-dimensional sphere in three-dimensional ambient space to a primitive half-edge surface.

Parameters:
sphereddg.Sphere

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

subdivision_stepsint (default=4)

Number of subdivisions performed.

Returns:
icosphereddg.halfedge.Surface
Raises:
ValueError

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

NotImplementedError

If the center of the sphere is a point at infinity.

ddg.conversion.halfedge.geometry.spheres.circle_to_halfedge(circle, subdivision_steps=20, co_attr='co')[source]

Converts a circle in three-dimensional space to a half-edge surface.

Parameters:
circleddg.Sphere

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

subdivision_stepsint (default=20)

Number of subdivisions performed.

co_attrstring (default=’co’)

Name of the vertex attribute that stores the circle coordinates.

Returns:
ddg.halfedge.Surface
Raises:
ValueError

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

NotImplementedError

If the center of the circle is a point at infinity.