mosaic.parametrization.Sphere#

class Sphere(radius, center)[source]#

Bases: Parametrization

Parametrize a point cloud as sphere.

Parameters:
radiusnp.ndarray

Radius of the sphere

centernp.ndarray

Center of the sphere along each axis.

__init__(radius, center)[source]#

Methods

__init__(radius, center)

compute_distance(points, **kwargs)

Computes the distance between points and the parameterization.

compute_normal(points)

Compute the normal vector at a given point on the surface.

fit(positions, **kwargs)

Fit a parametrization to a point cloud.

points_per_sampling(sampling_density[, ...])

Computes the approximate number of random samples required to achieve a given spatial sampling_density.

sample(n_samples[, normal_offset])

Samples points from the surface of a sphere.