Simulating a Brownian motion