pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
Perlin Noise Generator

Perlin Noise Generator - 1.0

Ian Mallett (geometrian)

Tags:

Description

I needed Perlin noise for a program I'm writing, and there weren't any good, easy implementations to use, nor any I could find in Python.

In a few hours I came up with this. It should be pretty straightforward. All the parameters are laid out--though you'll probably need to look around to find what they actually mean in detail. In brief, Perlin noise functions provide randomly generated noise. The features of this noise are all precisely the same size. By layering different frequency "waves" of this noise on top of each other, you can get chaotic looking random stuff. Higher frequency waves have less influence (amplitude). The number of waves is defined by "octaves" (line 98), the "persistence" (line 99) tells the factor by which the amplitude decreases over each harmonic, "tiledim" (line 21) is the number of cycles in the 1st order harmonic in one tile (before it repeats), and "repeats" (line 22) is the number of repeated tiles on the screen. The inputs as they are now generated the screenshot.

The screen shot was generated using an unmodified version of this program (the parameters are all the same). The screenshot is a single tileable 512x512 image in greyscale. I included a tiletester, which allows you to select a file and then visually see if the edges line up. All images created by this program should, as long as "repeats" is an integer.

Released as open source, as always. Give me a ping if you find this useful :-)

Links

Home Page: http://geometrian.com/programming/index.php
Source: http://www.geometrian.com/data/programming/projects/Perlin%20Noise/1.0/Perlin%20Noise.zip

Screenshot


click to view original size

Releases

Perlin Noise Generator - 1.0 - Feb 28, 2009

Pygame.org account Comments

If you wish to leave a comment with your pygame.org account, please sign in first.

February 28, 2009 11:06pm - Ian Mallett - nickname: (geometrian)
Er, look at the defaults. This renders 8 waves of Perlin Noise for every pixel. The result is certainly not going to be speedy in software. Put "octaves" at 1, and it should run a lot faster. That said, I did mean for this to be pre-computation device--you can save the image and use it later.
February 28, 2009 7:43pm - pymike - nickname: (pymike)
Neat sim. Too slow to be of use though.
February 28, 2009 7:26pm - Ian Mallett - nickname: (geometrian)
Version 1.0 released! (Versions 0.1, 0.2, and 0.3 were prerelease work)
spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
Nov 13, 2014

Nov 11, 2014


Nov 10, 2014

Nov 9, 2014

Nov 6, 2014


Nov 4, 2014

Nov 3, 2014

Oct 28, 2014

Oct 21, 2014

Oct 16, 2014

... more!
 
for pygame related questions, comments, and suggestions, please see help (lists, irc)