1

In my research, I am generating discrete planes that are intended to represent fractures in rock. The orientation of a fracture plane is specified by its dip and dip direction. Knowing this, I also know the components of the normal vector for each plane.

So far, I have been drawing dip and dip direction independently from normal distributions. This is OK, but I would like to add the ability to draw from the Fisher distribution.

The fisher distribution is described HERE

Basically, I want to be able to specify an average dip and dip direction (or a mean vector) and a "fisher constant" or dispersion factor, k, and draw values randomly from that orientation distribution.

Additional Info: It seems like the "Von Mises-Fisher distribution" is either the same as what I've been calling the "Fisher distribution" or is somehow related. Some info on the Von Mises-Fisher distribution:

As you can see, I've done some looking into this, but I admit that I don't fully understand the mathematics. I feel like I'm close, but am not quite getting it... Any help is much appreciated!

If it helps, my programming is in FORTRAN.

buergi
  • 6,039
  • 3
  • 19
  • 15
Flux Capacitor
  • 1,215
  • 5
  • 24
  • 40
  • Many questions on sampling are already on the site. Short short version: invert the CDF or reject. Existing questions: [Pseudorandom Number Generator - Exponential Distribution](http://stackoverflow.com/q/2106503) [Random number generator that produces a power-law distribution?](http://stackoverflow.com/q/918736) [Probability density function problem, from a paper, implemented using C++, not working as intended](http://stackoverflow.com/q/4103477) [How do I generate points that match a histogram?](http://stackoverflow.com/q/423006). Those aren't in Fortran, but the math is always the same. – dmckee --- ex-moderator kitten Dec 11 '10 at 07:25
  • 1
    Have a look at these two references on directional data. Fisher, NI., Statistical Analysis of Circular Data, Cambridge University Press, 1993. ISBN 0-521-35018-2 Fisher, NI., Lewis, T., Embleton, BJJ. Statistical Analysis of Spherical Data, Cambridge University Press, 1993. ISBN 0-521-45699-1 – Tony Dec 11 '10 at 07:27
  • I guess one thing I don't understand: In the link that I provided, the distribution is in terms of theta. So basically the distribution is one dimensional, so I don't quite understand how it works in 3D? For example, I could simulate some value theta, but that would specify a ring around the mean vector, not an actual point. – Flux Capacitor Dec 11 '10 at 07:43
  • Sorry but where is the Fortran part of the question? This seems like a "do my homework for me" (as much as that homework may be more interesting than the average we have on here) type of question. – Rook Dec 11 '10 at 12:27
  • By the way, the Fisher distribution is specifically 3-dimensional, but the von Mises-Fisher distribution is generalized to any number of dimensions. – amcnabb Mar 20 '13 at 22:01

2 Answers2

2

I think that you can do the math by hand

  • Integrate the density function of the Fisher Distribution to get the cumulative distribution function

    F(theta)=exp(K cos(theta)))/(exp(k)-exp(-k))

  • The next step is to find the inverse cumulative distribution function function, F^(-1)(y). This function fulfills

    F(theta)= y <=> F^(-1)(y) =theta

  • I think that you get the following.

    F^(-1)(y) = arccos(log((exp(k)-exp(-k))*y)/K)

  • Draw y1, y2, y3, y4... from a uniform distribution on the interval [0, 1]

  • Now, the numbers F^(-1)(y1), F^(-1)(y2), F^(-1)(y3), F^(-1)(y4) will be distributed according to the Fisher distribution..

nielsle
  • 381
  • 1
  • 10
  • Thanks for the help, that actually makes total sense. So, now I can draw values of theta according to the fisher distribution, but what does that mean in 3D? If I have some mean vector , drawing a value of theta would seem to define a circle around that vector. – Flux Capacitor Dec 11 '10 at 17:22
  • You have to use a second random variable to find a random point on the circle. You should draw this variable from a uniform distribution on ]0;2*pi. – nielsle Dec 12 '10 at 08:15
2

The algorithm is on page 59 of "Statistical analysis of spherical data" by N. I. Fisher, T. Lewis and B. J. J. Embleton. I highly recommend that book -- it will help you understand the mathematics.

The following will produce random Fisher distribution locations centered on the North pole. If you want them randomly centered, then you produce additional uniform random locations on the sphere and rotate these locations to be centered on those locations. If you are not sure of those steps, consult the aforementioned book. This Fortran code fragment uses a random number generator that produces uniform deviates from 0 to 1.

  lambda = exp (-2.0 * kappa)
  term1 = get_uniform_random () * (1.0 - lambda) + lambda
  CoLat = 2.0 * asin ( sqrt ( -log (term1) / (2.0 * kappa) ) )
  Long = 2.0 * PI * get_uniform_random ()
M. S. B.
  • 28,968
  • 2
  • 46
  • 73