Did someone know how to generate random numbers with a non-uniform density?
Easiest solution if applicable: Use C++11 random facilities or the ones from Boost, which have lots of non-uniform distributions for you.