Sampling the Fisher Distribution A preliminary plot sphere = ParametricPlot3D@ 8Cos@thetaD Cos@phiD, Cos@thetaD Sin@phiD, Sin@thetaD<, 8phi, 0, 2 Pi<, 8theta, -Pi ê 2, Pi ê 2<, Axes Ø False, PlotPoints Ø 23D Sampling the Homogeneous Distribution SeedRandom@1D set = 8<; Do@8z = RandomReal@8-1, 1<D, phi = RandomReal@80, 2 p<D, theta = ArcCos@zD, AppendTo@set, Point@8Sin@thetaD Cos@phiD, Sin@thetaD Sin@phiD, z<DD<, 85000<D 2 SamplingFisher.nb Show@Graphics3D@setD, sphereD The Fisher (2D) volumetric probability Fisher@t_, t0_, f_, f0_, k_D := Hk ê H4 p Sinh@kDLL Exp@k HCos@tD Cos@t0D + Sin@tD Sin@t0D Cos@f - f0DLD Numerical check that it is normalized (total probability equal to one) NIntegrate@Sin@tD Fisher@t, Pi ê 3, f, Pi ê 4, 3D, 8t, 0, Pi<, 8f, -Pi, Pi<D 1. Our Fisher distribution t0 = Pi ê 6; f0 = -Pi ê 4; k = 20; F@t_, f_D := Fisher@t, t0, f, f0, kD SamplingFisher.nb Maximum value? N@F@t0, f0DD 3.1831 But we only need a value that is larger of equal than the actual maximum value: Fmax = 4.; SeedRandom@1D set = 8<; Do@8 z = RandomReal@8-1, 1<D, phi = RandomReal@80, 2 p<D, theta = ArcCos@zD, P = F@theta, phiD ê Fmax, chance = RandomReal@80, 1<D, If@chance < P, AppendTo@set, Point@8Sin@thetaD Cos@phiD, Sin@thetaD Sin@phiD, z<DDD <, 850 000<D Show@Graphics3D@setD, sphereD 3
© Copyright 2026 Paperzz