Skip to content

Instantly share code, notes, and snippets.

View DereC4's full-sized avatar
🇹🇼
coding

Derek Chen DereC4

🇹🇼
coding
View GitHub Profile
@veb
veb / PerlinNoise.py
Created September 10, 2015 17:43
Perlin like noise with Python and pygame
import pygame
import math
def findnoise2(x,y):
n = int(x) + int(y) * 57
allf = 0xFFFFFFFF
an = (n << 13) & allf
n = (an ^ n) & allf
nn = (n*(n*n*60493+19990303)+1376312589)&0x7fffffff
return 1.0-(float(nn)/1073741824.0);