scimba_torch.geometry.monte_carlo_hypersurface¶
A module for sampling hypersurfaces.
Classes
|
Sampler for HyperSurfaces. |
- class HyperSurfaceSampler(points_file=None, parametric_hyper_surface=None, bounding_domain=None, **kwargs)[source]¶
Bases:
DomainSamplerSampler for HyperSurfaces.
It is constructed either from a .txt files containing points on the hypersurface, or from a ParametricHyperSurface.
- Parameters:
points_file (
str|None) – A .txt file of points on the curve, default to None.parametric_hyper_surface (
ParametricHyperSurface|None) – a parametric HyperSurface, default to None. One among points_file, parametric_hyper_surface must be provided.bounding_domain (
VolumetricDomain|list[tuple[float,float]] |Tensor|None) – a bounding domain for the surface. If None whereas parametric_hyper_surface is given, estimated by sampling.**kwargs – arbitrary keyword arguments
- Keyword Arguments:
nb_points_for_estimation – in case where bounding box is estimated, number of points for estimation; default in 10 000.
inflation_for_estimation – in case where bounding box is estimated, inflation factor used after estimation by sampling.
- Raises:
ValueError – Arguments are not correct.
- bc_sample(n)[source]¶
Samples n points on the hypersurface.
- Parameters:
n (
int|list[int]) – Number of points to sample.- Return type:
tuple[LabelTensor,LabelTensor]- Returns:
A tuple of tensors of sampled points and normals.
- Raises:
NotImplementedError – when the first argument is a list