Skip to content

MatthewFlamm/pyransame

Repository files navigation

pyransame

PYthon RAndom SAmpling for MEshes

Documentation

Utilities for choosing random samples of points within cells of PyVista meshes. This package does not choose random points that define the mesh itself, rather random points on 0D vertices, 1D lines, 2D surfaces or in 3D volumes are sampled.

All linear1 cells from vtk are supported, except for vtkConvexPointSet.

Random sampling on a 2D surface

Samples on a bunny

Random sampling in a 3D volume

Samples inside a 3D volume

Footnotes

  1. Linear here means not inheriting from vtkNonLinearCell.