📜  cmap perlin 噪声 python 代码示例

📅  最后修改于: 2022-03-11 14:47:07.347000             🧑  作者: Mango

代码示例1
import random
from perlin_noise import PerlinNoise
import matplotlib.pyplot as plt

noise = PerlinNoise(octaves=10, seed=random.randrange(1,1000000000000000))
xpix, ypix = 100, 100
pic = [[noise([i/xpix, j/ypix]) for j in range(xpix)] for i in range(ypix)]

plt.imshow(pic, cmap='gray')
plt.show()