Skip to content

mmchugh/pynoise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pynoise

Simple python library for generating perlin noise

To try it out with PIL (or pillow):

from PIL import Image
from pynoise import perlin

perlin_generator = perlin.Perlin(frequency=50)
noise_image = Image.new("RGB", (500, 500))

for x in xrange(500):
    for y in xrange(500):
        colour = (int((perlin_generator.value(x/500.0, y/500.0, 0.0) + 1) * 128), ) * 3
        noise_image.putpixel((x, y), colour)

out = open("perlin.png", "w")
noise_image.save(out)
out.close()

You should get something that looks like:

Perlin sample

About

Simple python library for generating perlin noise

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages