### Install PyFastNoiseLite Source: https://github.com/tizilogic/pyfastnoiselite/blob/main/README.md Install the PyFastNoiseLite package using pip. Replace 'pip' with 'pip3' if necessary on your system. ```bash pip install pyfastnoiselite # On some systems, "pip" has to be replaced by "pip3" ``` -------------------------------- ### Initialize and Get 2D Noise Source: https://github.com/tizilogic/pyfastnoiselite/blob/main/README.md Initialize FastNoiseLite with a seed and retrieve 2D noise values for given coordinates. The default noise type is OpenSimplex2, but it can be explicitly set. ```python from pyfastnoiselite.pyfastnoiselite import FastNoiseLite, NoiseType # Initializing with seed noise = FastNoiseLite(seed=1337) # Set noise type (optional, defaults to OpenSimplex2) noise.noise_type = NoiseType.NoiseType_OpenSimplex2S # Get 2D noise print(noise.get_noise(34, 22)) # 0.7130074501037598 print(noise.get_noise(100, 110)) # -0.614801287651062 ``` -------------------------------- ### Get 3D Noise Source: https://github.com/tizilogic/pyfastnoiselite/blob/main/README.md Generate 3D noise values using the initialized FastNoiseLite object for specified X, Y, and Z coordinates. ```python # Get 3D noise print(noise.get_noise(95, 100, 30)) # -0.45421651005744934 ``` -------------------------------- ### Generate Noise from Coordinates Array Source: https://github.com/tizilogic/pyfastnoiselite/blob/main/README.md Generate noise values for multiple 3D coordinates provided as a NumPy array. Ensure the coordinates are of type float32. ```python import numpy as np Xs = [3, 57, 95] Ys = [4, 13, 100] Zs = [0, -4, 30] coords = np.array([Xs, Ys, Zs], dtype=np.float32) # Generate noise for each coordinate print(noise.gen_from_coords(coords)) # [0.11303097 -0.5841235 -0.45224023] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.