Parameterization Quantities
A parameterization is a set of 2D coordinates associated with a surface, often referred to as “UV coordinates”.
Typically parameterizations are used on meshes (which is also supported in Polyscope!) but at times it may be useful to visualize a parameterization at the points of a point cloud.
Adding¶
PointCloud.add_parameterization_quantity(name, values, coords_type='unit', enabled=None, viz_style=None, grid_colors=None, checker_colors=None, checker_size=None, cmap=None)
Add a parameterization quantity to the mesh.
name
string, a name for the quantityvalues
anNx2
numpy array, coordinates at vertices/corners
This function also accepts optional keyword arguments listed below, which customize the appearance and behavior of the quantity.
Styles¶
Several styles are available for how a parameterization is displayed.
The viz_style
option determines how parameterizations are visualized:
checker
: a two-color checker patterngrid
: a two-color grid with thin lineslocal_check
: a checkerboard over a radial colormap, centered around(0,0)
local_rad
: distance stripes over a radial colormap, centered around(0,0)
Types¶
The coords_type
options determines how parameter coordinates are interpreted for scaling:
unit
: UV coords are assumed to lie on the[0,1]
intervalworld
: UV coords are assumed to be scaled like the world-space positions of the mesh
Parameterization Quantity Options¶
When adding a parameterization quantity, the following keyword options can be set. These are available for all kinds of parameterization quantities on all structures.
Keyword arguments:
enabled
boolean, whether the quantity is initially enabled (note that generally only one quantity can be shown at a time; the most recent will be used)coords_type
string, one of'unit'
,'world'
(see above)viz_style
string, one of'checker'
,'grid'
,'local_check'
,'local_rad'
(see above)grid_colors
2-tuple of rgb colors, used to color the grid visualizationchecker_colors
2-tuple of rgb colors, used to color the checkerboard visualizationchecker_size
float, the size of checkers/grid/stripescmap
string, which colormap to use
If not specified, these optional parameters will assume a reasonable default value, or a persistent value if previously set.