Planar high-level API
pyvoro2.planar.api
High-level 2D API for planar Voronoi and power tessellations.
compute(points, *, domain, ids=None, duplicate_check='off', duplicate_threshold=1e-05, duplicate_wrap=True, duplicate_max_pairs=10, block_size=None, blocks=None, init_mem=8, mode='standard', radii=None, return_vertices=True, return_adjacency=True, return_edges=True, return_edge_shifts=False, edge_shift_search=2, include_empty=False, validate_edge_shifts=True, repair_edge_shifts=False, edge_shift_tol=None, return_diagnostics=False, return_result=False, normalize='none', normalization_tol=None, tessellation_check='none', tessellation_require_reciprocity=None, tessellation_area_tol_rel=1e-08, tessellation_area_tol_abs=1e-12, tessellation_line_offset_tol=None, tessellation_line_angle_tol=None)
Compute planar Voronoi or power tessellation cells.
Supported domains
- :class:
~pyvoro2.planar.domains.Box - :class:
~pyvoro2.planar.domains.RectangularCell
Planar compute mirrors the 3D wrapper's diagnostics convenience path:
set return_diagnostics=True to also return a
:class:~pyvoro2.planar.TessellationDiagnostics object, and/or set
tessellation_check='warn' or 'raise' to have common area and
reciprocity issues handled directly by the wrapper.
Wrapper-level normalization convenience is also available via
normalize='vertices' or 'topology'. Any request for normalized
output returns a :class:~pyvoro2.planar.PlanarComputeResult, as does
return_result=True. The normalized structures intentionally carry their
own augmented cell copies, so the raw cells field can stay lightweight
even when internal geometry was needed for diagnostics or normalization.
For periodic domains, diagnostics and normalization automatically compute temporary edge shifts and the required edge/vertex geometry internally, even when those fields were not requested by the caller. Any such temporary fields are stripped from the raw returned cells unless they were explicitly requested.
ghost_cells(points, queries, *, domain, ids=None, duplicate_check='off', duplicate_threshold=1e-05, duplicate_wrap=True, duplicate_max_pairs=10, block_size=None, blocks=None, init_mem=8, mode='standard', radii=None, ghost_radius=None, return_vertices=True, return_adjacency=True, return_edges=True, return_edge_shifts=False, edge_shift_search=2, include_empty=True, validate_edge_shifts=True, repair_edge_shifts=False, edge_shift_tol=None)
Compute ghost Voronoi/Laguerre cells at planar query points.
locate(points, queries, *, domain, ids=None, duplicate_check='off', duplicate_threshold=1e-05, duplicate_wrap=True, duplicate_max_pairs=10, block_size=None, blocks=None, init_mem=8, mode='standard', radii=None, return_owner_position=False)
Locate the owning generator for each planar query point.
:::