scimba_torch.geometry.parametric_hypersurface

A module for parametric hypersurfaces.

Classes

ParametricHyperSurface(parametric_domain, ...)

Base class for representing a parametric hypersurface.

class ParametricHyperSurface(parametric_domain, surface)[source]

Bases: SurfacicDomain

Base class for representing a parametric hypersurface.

\[\{ y = \text{surface}(t) | t \in D \} where D is the parametric domain.\]
Parameters:
  • parametric_domain (VolumetricDomain | list[tuple[float, float]] | Tensor) – The parametric domain.

  • surface (Mapping) – Mapping from the parametric domain to the domain.

sample(n)[source]

Sample points on the hypersurface.

Parameters:

n (int) – the number of points to sample.

Return type:

tuple[Tensor, Tensor]

Returns:

A tuple of tensors, the points and the normals.

estimate_bounding_box(nb_samples=2000, inflation=0.1)[source]

Estimate a bounding box for the parametric curve by sampling points on it.

Parameters:
  • nb_samples (int) – the number of points to sample.

  • inflation (float) – the inflation factor for over-estimation.

Return type:

Tensor

Returns:

A bounding box of shape (d,2) containing all the points.

static bean_2d(a=3, b=5, theta=-1.5707963267948966)[source]

Bean 2D curve.

Parameters:
  • a (int)

  • b (int) –

  • theta (float) – the rotation angle.

Return type:

ParametricHyperSurface

Returns:

The Bean 2D as a parametric hypersurface.