How to simulate a random walk on a sphere

Click For Summary
SUMMARY

This discussion focuses on simulating a random walk on a unit sphere, specifically addressing the challenge of moving from a current location p_t to a new location p_{t+1} along a great circle. The law of cosine is ineffective at the poles, prompting suggestions for alternative methods. A recommended approach involves using rotation matrices to reposition the current point to the north pole, performing the random walk, and then applying the inverse rotation to obtain the new location. This method ensures accurate movement across all locations on the sphere.

PREREQUISITES
  • Understanding of spherical coordinates and great circles
  • Familiarity with rotation matrices in 3D space
  • Basic knowledge of trigonometry, particularly the law of cosines
  • Experience with random walks and probabilistic algorithms
NEXT STEPS
  • Research the implementation of rotation matrices in 3D graphics using libraries like NumPy
  • Explore algorithms for simulating random walks on spherical surfaces
  • Study the mathematical foundations of spherical coordinates and their applications
  • Learn about the implications of using different coordinate systems in simulations
USEFUL FOR

Mathematicians, computer scientists, and simulation developers interested in modeling random processes on spherical geometries.

phonic
Messages
28
Reaction score
0
Dear All,

I am simulating a random walk on a sphere with unit radius. I want to move from current location p_t to the new location p_{t+1} along the big circle, whose arc has an angle omega relative to p_t's latitude. I tried using the law of cosine. But at the poles, the law of cosine diverges. Can anyone help find a method that works for all location on the sphere? Thanks!
 
Physics news on Phys.org
phonic said:
Dear All,

I am simulating a random walk on a sphere with unit radius. I want to move from current location p_t to the new location p_{t+1} along the big circle, whose arc has an angle omega relative to p_t's latitude. I tried using the law of cosine. But at the poles, the law of cosine diverges. Can anyone help find a method that works for all location on the sphere? Thanks!

I am not sure what you mean by law of cosine, but I would suggest: If your algorithm is correct, then do not start your walk at the pole. Probability that you will ever reach the pole is zero, I guess.
 
So say, at each step, you want to move by an angle \alpha along a random great circle through the current point. If your current point is the "north pole", i.e. (0,0,1) in xyz coordinates, then that's just a rotation, call it R, by \alpha, with axis a random line in the xy-plane.

And rather than worry about how you'd do it if the point isn't the north pole, I'd instead do a rotation C to bring my current point to the north pole, then do as above, then do the inverse of C. Finding such a C is straightforward; one way would be to project the current point to the xy-plane, draw a line through it and the origin, and take the perpendicular line through the origin to be the axis of rotation. Then you can rotate so that p travels along a great circle to the north pole. There are lots of other C's that would work (where p doesn't move along a great circle), but that's probably the easiest to compute. (Detail: if p is the south pole, this isn't well-defined, so just let C be the map that mirrors the sphere across the xy-plane.)

So then the effect of CRC^{-1} on p is to carry it to a new point at an angular distance \omega away, along a random great circle passing through p.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 42 ·
2
Replies
42
Views
7K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 16 ·
Replies
16
Views
3K