mosaic.parametrization.Sphere#
- class Sphere(radius, center)[source]#
Bases:
ParametrizationParametrize a point cloud as sphere.
- Parameters:
- radiusnp.ndarray
Radius of the sphere
- centernp.ndarray
Center of the sphere along each axis.
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.