Jump to content
  • Advertisement
Sign in to follow this  
Lode

Guassian noise

This topic is 5021 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've got a function that returns a random floating point number between 0 and 1, with uniform division (actually it just uses the standard C++ rand function and normalizes it). How can I easily use it to build a function that'll return a random number with gaussian division? I mean standard normal division, other gaussian divisions are easy to get once you have that one. I know it can be approximated by taking the sum of a few random numbers, but is there a quicker way? Without taking an integral of course, since we're talking about C++ code here.

Share this post


Link to post
Share on other sites
Advertisement
If x have uniform distribution with range 0..1 ,

a=erf -1(x*2 - 1)
will have normal aka gaussian distribution. (note the clickster)

You probably can find some ready-to-use implementations in the web by googling for something like gaussian distribution random generator .

[Edited by - Dmytry on January 16, 2005 12:46:36 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!