blocks.add_surface_noise package

Submodules

blocks.add_surface_noise.add_surface_noise module

blocks.add_surface_noise.add_surface_noise.add_gauss_noise_to_surface(surface, sigma=0.001, rnd=<module 'random' from '/home/docs/.asdf/installs/python/3.8.18/lib/python3.8/random.py'>)

Take a surface and move the points randomly. Note: This replaces the surface’s points with a new vtkPoints object.

Parameters:
  • surface (vtkPolyData) – surface data

  • sigma (float) – standard deviation of the gaussian noise added to the point positions

blocks.add_surface_noise.add_surface_noise.sparsify_surface(surface, scale=1, shift=0, frequency=9)

Randomly “sparsifies” a point cloud.

This function considers removing every point according to a 3D perlin noise function: the higher the noise value at the point’s position, the higher the likelihood of the point being removed.

Parameters:
  • surface (vtkPolyData) – surface data

  • scale (float) – Controls the scale factor of the perlin noise. High values (>1) make areas more diverse, low values (~0) mean that all points are removed with the same probability.

  • shift (float) – Increase (shift > 0) or decrease (shift < 0) probability of all points that they will be removed.

  • frequency (float) – Noise frequency. High frequency leads to many small sparse areas, low frequency leads to fewer, larger ones. Default: 9

blocks.add_surface_noise.add_surface_noise.subdivide_surface(surface, subdivFactor)

Subdivide a surface. The number of triangles are increased by (roughly) a factor of ‘subdivFactor’. Warning: If mesh was watertight before, this function may break that!

blocks.add_surface_noise.add_surface_noise_block module

Module contents