code: def perlin_noise(
      amplitude, freq: Sequence[float], phase: Sequence[float]
  ):
      """Return the implicit function that implements Perlin noise.
  
      Uses ``vtk.vtkPerlinNoise`` and computes a Perlin noise field as
      an implicit function. ``vtk.vtkPerlinNoise`` is a concrete
      implementation of ``vtk.vtkImplicitFunction``. Perlin noise,
      originally described by Ken Perlin, is a non-periodic and
      continuous noise function useful for modeling real-world objects.
  
      The amplitude and frequency of the noise pattern are
      adjustable. This implementation of Perlin noise is derived closely
      from Greg Ward's version in Graphics Gems II.
  
      Parameters
      ----------
      amplitude : float
          Amplitude of the noise function.
  
          ``amplitude`` can be negative. The noise function varies
          randomly between ``-|Amplitude|`` and
          ``|Amplitude|``. Therefore the range of values is
          ``2*|Amplitude|`` large. The initial amplitude is 1.
  
      freq : sequence[float]
          The frequency, or physical scale, of the noise function
          (higher is finer scale).
  
          The frequency can be adjusted per axis, or the same for all axes.
  
      phase : sequence[float]
          Set/get the phase of the noise function.
  
          This parameter can be used to shift the noise function within
          space (perhaps to avoid a beat with a noise pattern at another
          scale). Phase tends to repeat about every unit, so a phase of
          0.5 is a half-cycle shift.
  
      Returns
      -------
      vtk.vtkPerlinNoise
          Instance of ``vtk.vtkPerlinNoise`` to a Perlin noise field as an
          implicit function. Use with :func:`pyvista.sample_function()
          <pyvista.core.utilities.features.sample_function>`.
  
      Examples
      --------
      Create a Perlin noise function with an amplitude of 0.1, frequency
      for all axes of 1, and a phase of 0 for all axes.
  
      >>> import pyvista as pv
      >>> noise = pv.perlin_noise(0.1, (1, 1, 1), (0, 0, 0))
  
      Sample Perlin noise over a structured grid and plot it.
  
      >>> grid = pv.sample_function(noise, [0, 5, 0, 5, 0, 5])
      >>> grid.plot()
  
      """
      noise = _vtk.vtkPerlinNoise()
      noise.SetAmplitude(amplitude)
      noise.SetFrequency(freq)
      noise.SetPhase(phase)
      return noise
  
file_path: pyvista/pyvista/core/utilities/features.py
imports: import collections.abc
  import os
  import sys
  from typing import Sequence
  import numpy
  import pyvista
  from pyvista.core import _vtk_core
  from .helpers import wrap
label_desc: Use image node_id 9 for calling a global function with example usage: perlin_noise(amplitude, freq, phase) and returns: noise