Skip to content

Commit

Permalink
linked perlin noise to wikipedia
Browse files Browse the repository at this point in the history
  • Loading branch information
tpltnt committed Mar 22, 2015
1 parent b785ebc commit 271cb62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _tutorials/03_graphics/generativemesh.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ The mesh resembles something you might find under a microscope, so let's add som

![Jitter](003_images/jitterSmall.gif)

On each frame, we are going to move each vertex by a small, random amount. Instead of using [ofRandom()](http://www.openframeworks.cc/documentation/math/ofMath.html#show_ofRandom) to displace our vertices, we are going to use [ofSignedNoise()](http://openframeworks.cc/documentation/math/ofMath.html#!show_ofSignedNoise) which generates a thing called Perlin noise. Check out Daniel Shiffman's description of Perlin noise in section [1.6 Perlin Noise (A Smoother Approach)](http://natureofcode.com/book/introduction/#i6-perlin-noise-a-smoother-approach) of his online book. Perlin noise yields random values that smoothly vary over time. You can get a good idea of the difference between random values and Perlin noise by checking out [figure 1.5](http://natureofcode.com/book/imgs/intro/intro_05.png) (which shows sequential values of noise) and [figure 1.6](http://natureofcode.com/book/imgs/intro/intro_06.png) (which shows sequential random values) from the book.
On each frame, we are going to move each vertex by a small, random amount. Instead of using [ofRandom()](http://www.openframeworks.cc/documentation/math/ofMath.html#show_ofRandom) to displace our vertices, we are going to use [ofSignedNoise()](http://openframeworks.cc/documentation/math/ofMath.html#!show_ofSignedNoise) which generates a thing called [Perlin noise](https://en.wikipedia.org/wiki/Perlin_noise). Check out Daniel Shiffman's description of Perlin noise in section [1.6 Perlin Noise (A Smoother Approach)](http://natureofcode.com/book/introduction/#i6-perlin-noise-a-smoother-approach) of his online book. Perlin noise yields random values that smoothly vary over time. You can get a good idea of the difference between random values and Perlin noise by checking out [figure 1.5](http://natureofcode.com/book/imgs/intro/intro_05.png) (which shows sequential values of noise) and [figure 1.6](http://natureofcode.com/book/imgs/intro/intro_06.png) (which shows sequential random values) from the book.

With ofRandom(), you specify a range of values, and it returns a random value within that range. If you were to call it multiple times in a row, you will (very, very likely) get a new value every time you call it. Perlin noise works a bit differently. ofSignedNoise() will always return a value between -1.0 and 1.0, but you still have to pass in an input to the function. Think of ofSignedNoise() as a squiggly line drawn on graph paper. You pass in a coordinate, an x value, and it will return the corresponding y value. If you were to call ofSignedNoise(3.0) multiple times, you would get the same value every time.

Expand Down

0 comments on commit 271cb62

Please sign in to comment.