waxmorph.data.sample_mesh_pair#
- waxmorph.data.sample_mesh_pair(source_path, target_path, n_points=2000, target_extent=10.0, *, source_extent=None, max_particles=None, seed=0)[source]#
Sample independent, equal-count source and target clouds.
Each repaired mesh is normalized and starts from its own volume-derived radius:
\[r = \left(\frac{3V}{4\pi N}\right)^{1/3}, \qquad d_{\min} = 1.2\,r,\]Exact-count sampling may lower
randd_mintogether; returned radius fields hold the effective values. Source and target useseedandseed+1. Their rows contain reproducible independent samples.target_extent=Nonemeans 10;source_extentdefaults to the target extent. Recordedmax_particlesis never belown_points.- Returns:
"source_pos"– source agent centers, float32, shape[N, 3]."target_pos": target agent centers, float32, shape[N, 3]."radius": effective source radius (alias of"source_radius")."R_init": initial uniform radius for the rollout (equals the source radius)."n_points": requested countN."n_source": number of source points (equalsN)."n_target": number of target points (equalsN)."max_particles": recorded capacity,max(max_particles, n_points)."source_extent": source normalization extent (float)."target_extent": target normalization extent (float)."source_radius": effective source particle radius (float)."target_radius": effective target particle radius (float)."target_radii": alias of"target_radius"for sequence-API symmetry (float)."target_mesh": the normalized targettrimesh.Trimesh.
- Parameters:
- Return type:
Exact-count failure raises
RuntimeError; invalid counts, extents, or volume raiseValueError.