Parametrization#

The parametrization module provides abstract and concrete classes for representing point cloud surfaces as parametric models. These models support surface sampling, normal computation, and distance calculations.

Base Class#

Parametrization

Abstract base class to represent picklable parametrizations.

Geometric Shapes#

Parametric representations of simple geometric primitives.

Sphere(radius, center)

Parametrize a point cloud as sphere.

Ellipsoid(radii, center, orientations)

Parametrize a point cloud as ellipsoid.

Cylinder(centers, orientations, radius, height)

Parametrize a point cloud as a cylinder.

RBF(rbf, direction, grid)

Parametrize a point cloud using radial basis functions.

SplineCurve(positions[, order])

Parametrize a point cloud as a spline curve.

Triangular Meshes#

Surface representations using triangular mesh topology.

TriangularMesh(mesh[, repair])

Represent a point cloud as triangular mesh.

BallPivoting(mesh[, repair])

PoissonMesh(mesh[, repair])

AlphaShape(mesh[, repair])

Represent a point cloud as triangular mesh.

FlyingEdges(mesh[, repair])

Represent a point cloud as triangular mesh.

Utilities#

Functions for combining and manipulating parametrization objects.

merge(models)

Type Registry#

The module provides a PARAMETRIZATION_TYPE dictionary that maps string identifiers to parametrization classes, enabling dynamic instantiation based on user selection.

from mosaic.parametrization import PARAMETRIZATION_TYPE

# Available keys:
# "sphere", "ellipsoid", "cylinder", "ball_pivoting",
# "poisson", "rbf", "alpha_shape", "spline", "flying_edges"

mesh_class = PARAMETRIZATION_TYPE["poisson"]
mesh = mesh_class.fit(points, depth=8)