pymem3dg.util.sphericalHarmonicsPerturbation

pymem3dg.util.sphericalHarmonicsPerturbation(coordinate: ndarray[Any, dtype[float64]], m: int, n: int, amplitude: float, origin: list = [0, 0, 0])

Apply spherical harmonics to perturb the vertex positions of the mesh in the direction of (position - origin)

Parameters:
  • coordinate (ndarray) – vertex coordinate of the mesh

  • m (int) – spherical harmonics order

  • n (int) – spherical harmonics

  • amplitude (float) – amplitude of perturbation

  • origin (_type_, optional) – origin of direction vector. Defaults to [0, 0, 0].

Returns:

perturbed coordinate matrix of the mesh

Return type:

ndarray