Beispiel #1
0
 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
Beispiel #2
0
 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)
Beispiel #3
0
 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
Beispiel #4
0
 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
Beispiel #5
0
 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)
Beispiel #6
0
 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