def draw_bd_displacement(self, dt, D): r = math.sqrt(2.0 * D * dt) # Draw 2 numbers from normal distribution. x, y = myrandom.normal(0.0, r, 2) return x * self.shape.unit_x + y * self.shape.unit_y
def draw_bd_displacement(self, dt, D): r = math.sqrt(2.0 * D * dt) # Draw 3 numbers from normal distribution. return myrandom.normal(0.0, r, 3)
def draw_bd_displacement(self, dt, D): r = math.sqrt(2.0 * D * dt) # Draw 1 number from normal distribution. z = myrandom.normal(0.0, r, 1) return z * self.shape.unit_z