We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexSuggestions & BugsSoftware Bugs › noiseSeed()
Page Index Toggle Pages: 1
noiseSeed() (Read 1536 times)
noiseSeed()
Nov 7th, 2006, 12:37am
 
The noiseSeed() function only works once, and only if called before noise().  It will not RE-seed the perlin noise routines once they'be been seeded.  I believe the problem is the internal perlin[] array that only gets created once, but should probably be repopulated from scratch whenever noiseSeed() is called.

To demonstrate, run this sketch and note seed 0 value:

noiseSeed(0); // make a rng with seed 0
noise(0,0,0); // fill perlin[] with seed 0
println(noise(0,0,0)); // prints 0.6852823

Then run this sketch and note seed 12345 value:

noiseSeed(12345); // make a rng with seed 12345
noise(0,0,0); // fill perlin[] with seed 12345
println(noise(0,0,0)); // prints 0.33919036

Then run this sketch and note that seed 12345 returns seed 0's value:

noiseSeed(0); // make a rng with seed 0
noise(0,0,0); // fill perlin[] with seed 0
noiseSeed(12345); // make a rng with seed 12345
noise(0,0,0); // does not repopulate perlin[], still from seed 0
println(noise(0,0,0)); // prints 0.6852823
Re: noiseSeed()
Reply #1 - Nov 9th, 2006, 3:56am
 
k, found and fixed for 0122. just a matter of resetting the table.
Page Index Toggle Pages: 1