It's been a little while, so I thought I would catch up on my 2D Universe. Those who have been following closely will have seen that we have derived our equations of motion over the surface of a sphere, and now all we need at the acceleration terms. This is where it starts to get a little sticky.

The first part is the easy point. If you remember, we want a gravitational-like force, and this depends on the distance between the two objects. Now, again, there is more than one way to skin a rabbit (is there?) but I am going to take the computationally simple approach.

Any point on a sphere is denoted by our two coordinates, (θ,φ); remember, it's a 2D surface, so no radius to worry about. But let's pretend it's a unit sphere, so we have

*r=1*, then we can convert these polar coordinates to Cartesian with the usual transformation. Matlab has an inbuilt function for doing this, sph2cart, although one has to be careful with which angle is which (remember, there is some ambiguity in the definition of which angle is θ and which is φ). So, any point on the sphere gets mapped to a Cartesian point,

*(x,y,z)*.

Now, we can treat these coordinates as components of a unit vector, and then all we need to do is to take the dot product of two such vectors to give

The angle, ξ, is just the distance between the points

*on the sphere*. Excellent!!

So, in my 2D spherical universe, the strength of gravity varies as ξ

^{-1}(unlike gravity in our 3D universe which goes as the

*inverse square*of distance). However, given we are on a sphere, I have made two components of the force, one on the shortest distance between two point, which is just ξ, and one on the longest, which is 2π - ξ. Why? So, if I have two objects at rest at opposite poles, then there is no net force acting and they just sit there.

Now, as I said, the magnitude of the force is the easy bit. The hard bit is working out which direction the force points in. Hmmmm. This needs a little more thought, but the key thing is that we are asking for the bearing you must set off from point one to travel to point two. Of course, jolly old navigators sorted this one out long ago.

There a lots of approaches, but I want a vector bearing, so I followed this little set of recipes, which work very well. The good thing is that you end up with a vector,

*W*, in a tangent plane, which is, as the name suggests, a plane which is tangent to the surface of the sphere at the point of interest.

The bad part is that, because I was working with Cartesian coordinates, I now have a 3D vector with components in

*(x,y,z)*, but what I really need is components in the angular coordinates on the sphere. Here I call on the magic of tensors, especially the rules that let you convert from one coordinate system to another, so my acceleration in angular coordinates is related to that in Cartesian coordinates via

Those in the know will recognise this as the Jacobian. Looks messy, but how do we know this has worked? Well, our vector is in the tangent plane, and so

*a*should be zero (there should be no vector pointing in the radial direction). And there isn't, so it is all wonderful!

^{r}So, that's it. We now have our gravitational attraction in the polar coordinates of the sphere, so that completes the equations of motion. We integrate and we get

Wonderful! (Well I think so). Right, I think this is now done and dusted, and I promised to get back to zombies soon. I'll also put together some notes on the shapes of oceans on non-spherical worlds, but that's for later.

## No comments:

## Post a Comment