24 lines
398 B
Python
24 lines
398 B
Python
# -*- coding: utf-8 -*-
|
|
"""
|
|
Created on Thu Nov 21 11:49:30 2019
|
|
|
|
@author: savrillon
|
|
"""
|
|
|
|
from perlin import PerlinNoise
|
|
import numpy as np
|
|
|
|
graine = 42
|
|
zoom=0.2
|
|
pos = np.random.randint(0,0xFFFFFFF,(2,))
|
|
taille=(100,100)
|
|
P = PerlinNoise(zoom,graine)
|
|
chunk = P.getChunk(pos[0],pos[1],taille)
|
|
|
|
chunk -= (chunk<0)*chunk
|
|
chunk *= 1000
|
|
chunk = chunk.astype(int)
|
|
|
|
print(chunk)
|
|
|