Esempio n. 1
0
vector RandomBrownianVector(double variance) {

    vector u;

    u.x = variance*RandomGaussianNumber();
    u.y = variance*RandomGaussianNumber();
    u.z = variance*RandomGaussianNumber();

    return u;
}
Esempio n. 2
0
// Generates A Random Velocity According To A Boltzmann Distribution
double RandomVelocity(double temperature)
{
  return sqrt(temperature)*RandomGaussianNumber();
}